Giter Club home page Giter Club logo

scala-datetime's Introduction

Scala Date&Time

Goals: 
 - A native and idiomatic Scala library for time, date and calendar related work.
 - Code shall be Scala only to be reasonably platform-independent.

Status:
 - This code is actively developed, but not yet production-ready. 
   If you need something useable NOW, consider the JodaTime wrappers scalaj-time by Jorge Ortiz.
 - The source code is based on the reference implementation of JSR-310 - ThreeTen - which was ported to Scala.
 - The Scala packages lives in the "scalax.time" namespace currently.
 - Class hierarchy has not yet been changed
 - Improved naming: LocalDate/LocalTime/LocalDateTime => Date/Time/DateTime, ZoneId => TimeZone

Strategy:
 - Java's "constructor arguments + field + getter" pattern are already replaced by class Foo(val bar: ...) or similiar.
 - Properties replace getters/setters.
 - Methods with default arguments replace overloaded methods.
 - scala.Serializable replaces java.io.Serializable.
 - scala.math.Ordered replaces java.lang.Comparable.
 - Objects extending sealed/abstract classes replace Java's enumeration. Bug #4023 blocks further progress. 
 - Usages of BigInteger/BigDecimal are replaced by BigInt/BigDecimal.
 - Methods return something like "Option[Int]" instead of "Integer (or null)".

ToDo:
 - Get the ThreeTen tests running against Scala Date&Time (main focus currently)
 - Some algorithms could need further cleanup.
 - A few places with "continue" need investigation to be replaced.
 - There are some classes which do some "reification" magic. 
   These might be replaced by a simple Manifest.
 - The code has a few places where Java collections instead of Scala collections are used.
 - ResourceZoneRulesDataProvider, StandardZoneRules, PeriodUnit and 
   TZDBZoneRulesCompiler need additional attention.
 - Most of the static initializers and classes with multiple constructors are fixed, 
   but a few tricky ones remain (especially exceptions).
 - JavaDoc-style comments need to converted to ScalaDoc-style comments.
 - Add convenience methods like "5 seconds" or "7 days"

Advice, comments, criticism, contributions or help is welcome!

scala-datetime's People

Contributors

dimensia avatar soc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.