Is there a library for timeline composition in Java or Scala?

I am looking for a library for Java or Scala that allows the logical compilation of time intervals to define periods such as "Monday-Friday, except 23: 00-23: 20 UTC". Something like defining a crontab interval, but with arbitrary compositions. Is there anything similar?

+4
source share
3 answers

I donโ€™t know if there is anything like that, but as a base you can look at JODA Time , an extensive Java library for all kinds of date and time processing.


EDIT:

I just remembered that Play! Framework uses CRON expressions. It contains a CRON parser that may be useful to you:

https://github.com/playframework/play/blob/master/framework/src/play/libs/Time.java

He also got this Quartz parser, an open source task scheduler that might also interest you: http://www.quartz-scheduler.org/ p>

+5
source

There is a Scala wrapper for Joda Time and scala-datetime , the current implementation of JSR-310.

+4
source

Well, this is joda-time, not joda-date, but it definitely has interval mechanisms, so you donโ€™t have to parse the interval formats you are interested in.

Note that Stephen has a new project based on JSR-310 called "threeten" - see http://threeten.sourceforge.net/ .

+3
source

Source: https://habr.com/ru/post/1346032/


All Articles