Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
NotificationsYou must be signed in to change notification settings

t2v/datetime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Scala Wrapper for JSR310

This project is suspended until ThreeTen is unstable.Please examine usingnscala-time instead of t2v-datatime.

dependencies

install

  1. AddProjectRef into yourproject/Build.scala.

    importsbt._importKeys._objectApplicationBuildextendsBuild {lazyvalmain=Project(id="main", base= file(".")).dependsOn(datetime)lazyvaldatetime= uri("https://github.com/t2v/datetime.git")  }

Keep in mind that t2v-datetime is depends on unstable libraries.

usage

Instant

importjavax.time._importjp.t2v.util.datetime._scala> nowres0: javax.time.Instant=2012-12-09T18:12:35.490Zscala> now> res0res1:Boolean=truescala> res0+10.days+3.minutesres2: javax.time.Instant=2012-12-19T18:15:35.490Z

Period and Duration

importjavax.time._importjp.t2v.util.datetime._scala>10.yearsres0: javax.time.Period=P10Yscala>10.monthsres1: javax.time.Period=P10Mscala>10.weeksres2: javax.time.Period=P70Dscala>10.daysres3: javax.time.Period=P10Dscala>10.hoursres4: javax.time.Duration=PT36000Sscala>10.minutesres5: javax.time.Duration=PT600Sscala>10.secondsres6: javax.time.Duration=PT10Sscala>10.millisecondsres7: javax.time.Duration=PT0.01S
// Duration + Duration = Durationscala>10.minutes+3.secondsres8: javax.time.Duration=PT603S// Duration + Period = Periodscala>10.hours+10.daysres9: javax.time.Period=P10DT10H// Period + Duration = Periodscala>3.months+10.secondsres10: javax.time.Period=P3MT-10.S// Period + Period = Periodscala>3.months+10.daysres11: javax.time.Period=P3M10D

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp