Popularity
4.4
Stable
Activity
2.3
Declining
61
54
8
Programming language: Scala
License: MIT License
Tags:
Extensions
Latest version: v0.3.2
chronoscala alternatives and similar packages
Based on the "Extensions" category.
Alternatively, view chronoscala alternatives based on common mentions on social networks and blogs.
-
Twitter Util
General-purpose Scala libraries, including a future implementation and other concurrency tools. -
better-files
Simple, safe and intuitive Scala I/O. better-files is a dependency-free pragmatic thin Scala wrapper around Java NIO. -
Cassovary
A Scala library that is designed from the ground up for space efficiency, handling graphs with billions of nodes and edges. -
Enumeratum
A macro to replace Scala enumerations with a sealed family of case objects. This allows additional checks for the compiler, e.g. for missing cases in a match statement. Has additinal support for Json libraries and the Play framework. -
Scala Graph
A Scala library with basic graph functionality that seamlessly fits into the Scala standard collections library. -
Eff
Extensible effects are an alternative to monad transformers for computing with effects in a functional way. -
Hamsters
A mini Scala utility library. Compatible with functional programming beginners. Featuring validation, monad transformers, HLists, Union types. -
scribe
Practical logging framework that doesn't depend on any other logging framework and can be completely configured programmatically. -
Scala Blitz
A library to speed up Scala collection operations by removing runtime overheads during compilation, and a custom data-parallel operation runtime. -
Play monadic actions
A simple scala DSL to allow clean and monadic style for Play! Actions -
Freedsl
A library to implement composable side effects, weaving typeclasses on a wrapping type and the free monad. -
Resolvable
A library to optimize fetching immutable data structures from several endpoints in several formats.
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of chronoscala or a related project?
Popular Comparisons
README
chronoscala
A JSR-310 port of nscala_time
Supported environment
- Scala 2.11.x / 2.12.x / 2.13.x
- Requries Java 8 or later
- Scala.js
Installation
libraryDependencies += "jp.ne.opt" %% "chronoscala" % LATEST_VERSION
Usage
import jp.ne.opt.chronoscala.Imports._
ZonedDateTime.now() + 2.months // returns java.time.ZonedDateTime = 2016-09-12T02:24:22.724+09:00[Asia/Tokyo]
OffsetDateTime.now() + 2.months // returns java.time.OffsetDateTime = 2016-09-12T02:24:22.724+09:00
ZonedDateTime.now() < ZonedDateTime.now() + 1.month // returns true
ZonedDateTime.now() to (ZonedDateTime.now() + 1.day) // returns Interval(2016-07-11T19:15:42.641Z,2016-07-12T19:15:42.641Z)
(ZonedDateTime.now() to (ZonedDateTime.now() + 1.second)).millis // returns 1000
2.hours + 45.minutes + 10.seconds // returns PT2H45M10S
(2.hours + 45.minutes + 10.seconds).millis // returns 9910000
2.months + 3.days // returns P2M3D
LocalDate.now() to (LocalDate.now() + 7.days) by 2.days // returns DateInterval(2016-09-04, 2016-09-06, 2016-09-08, 2016-09-10)
Chronoscala also provides NamespacedImports
to avoid conflicts between other package such as scala.concurrent.duration
.
import jp.ne.opt.chronoscala.NamespacedImports._
// Methods are namespaced with `cs`.
2.cs.months + 3.cs.days // returns P2M3D
2L.cs.seconds + 3L.cs.seconds // returns PT5S
ClockProvider
ClockProvider
is useful for unit testing.
import jp.ne.opt.chronoscala.Imports._
import jp.ne.opt.chronoscala.ClockProvider
ClockProvider.setCurrentClockFixedMillis(0L)
Instant.now() // returns 1970-01-01T00:00:00Z