migdus / scala-time Goto Github PK
View Code? Open in Web Editor NEWThis project forked from jorgeortiz85/scala-time
A Scala wrapper for Joda Time
License: Apache License 2.0
This project forked from jorgeortiz85/scala-time
A Scala wrapper for Joda Time
License: Apache License 2.0
A Scala wrapper for Joda Time USAGE: import org.scala_tools.time.Imports._ DateTime.now // returns org.joda.time.DateTime = 2009-04-27T13:25:42.659-07:00 DateTime.now.hour(2).minute(45).second(10) // returns org.joda.time.DateTime = 2009-04-27T02:45:10.313-07:00 DateTime.now + 2.months // returns org.joda.time.DateTime = 2009-06-27T13:25:59.195-07:00 DateTime.nextMonth < DateTime.now + 2.months // returns Boolean = true DateTime.now to DateTime.tomorrow // return org.joda.time.Interval = // 2009-04-27T13:47:14.840/2009-04-28T13:47:14.840 (DateTime.now to DateTime.nextSecond).millis // returns Long = 1000 2.hours + 45.minutes + 10.seconds // returns org.scala_tools.time.DurationBuilder // (can be used as a Duration or as a Period) (2.hours + 45.minutes + 10.seconds).millis // returns Long = 9910000 2.months + 3.days // returns Period This is mostly a convenience wrapper around the Joda Time libraries, adding more pleasant syntax like operators for addition, subtraction, and comparison. Also, most fields usually available as "getField" are now simply available as "field", following the Scala convention. Some instances of "asX" or "toX" have also been shortened. Please see Joda Time for full explanation of key concepts and API: http://joda-time.sourceforge.net/index.html INSTALLATION: Add the following to your sbt build: libraryDependencies += "org.scalaj" %% "scalaj-time" % "0.7" MOTIVATION: The Java Date and Calendar libraries are largely inadequate. They are mutable, not thread-safe, and very inconvenient to use. The Joda Time library is a great replacement for Java's Date and Calendar classes. They're immutable by default, have a much richer and nicer API, and can easily be converted to Java's Date and Calendar classes when necessary. This project provides a thin layer of convenience around the Joda Time libraries, making them more idiomatic to use within Scala.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.