overlaps? with four arguments (#264).adjust for intervals, so they can be "moved" backwards and forwards by one or more periods (#257).clj-time.coerce) (#255, @jconti). DateTime can be converted to-edn and can be printed as #clj-time/date-time "...", and data_readers.clj provides the conversion from that back to DateTime.spec_test.clj to avoid Clojure refer warnings.oraclejdk7 from test matrix (we still support openjdk7); add openjdk8; test Clojure 1.10 on Java 8+ only (#253).ReadableInstant now extends to Inst, providing inst? and inst-ms on most Joda Time types (#248, #249)Added deprecation notice and recommendation to move to Java Time (and clojure.java-time).
Clarified behavior of functions when passed nil (due to how Joda Time handles null objects).
Update to Joda Time 2.9.9.
Drop Clojure 1.6.0 support.
Refactor code to be more idiomatic (mostly when instead of if).
Fully-qualify function return type hints to avoid requiring imports on use (#241).
clojure.spec to clojure.spec.alpha to work with latest Clojure 1.9 builds.week-year to go with week-number-of-year (#239, #240).from-epoch.today-at is UTC.clj-time.spec namespace (requires Clojure 1.9 Alpha 17).clj-time.types namespace with type-based predicates.floor now retains timezone information (#204).with-time-at-start-of-day (#219).Joda Time has been upgraded to 2.9.3.
java.sql.Date and java.sql.Time are now coerced automatically if you require clj-time.jdbc (previously only java.sql.Timestamp was coerced).
The formatter function now accepts keywords and formatter objects, as well as string formats, so you can easily select a standard format (with a keyword) or provide a specific formatter object.
The library now depends on Clojure 1.8.0 and is tested against 1.6.0, 1.7.0, and 1.9.0-master-SNAPSHOT.
first-day-of-the-month? and last-day-of-the-month? -- aliases to improve consistency (so it's the-month everywhere).min-date and max-date -- to return the minimum or maximum of two or more dates.nth-day-of-the-month -- return the Nth day of the year/month, or date/time.nth-day-of-the-month? -- return true if a given date/time is on the Nth day of its month.with-time-at-start-of-day -- return the time at the start of the day, including timezone and DST support.today-at-midnight -- deprecated in favor of with-time-at-start-of-day.Issue 185 is fixed by explicitly tying the :rfc822 formatter to the US locale.
The examples in the README are now automatically tested (by midje-readme) so they are more likely to be valid.
Joda Time has been upgraded to 2.8.2.
The library now depends on Clojure 1.7.0.
clj-time.instant is a new namespace that, when loaded, makes it possible
for the Clojure reader to serialize Joda Time data types.
Joda Time has been upgraded to 2.7.
equal?A new predicate equal? has been added, which can be used like before? and
after? to assert two instants represent identical points in time regardless of
differences in time zone.
Contributed by @gws.
clj-time.jdbcA new namespace clj-time.jdbc has been added which extends protocols in
clojure.java.jdbc to allow for easy coercion to and from java.sql.Timestamp
driven by clj-time.coerce.
Contributed by @gws.
clj-time.format/with-default-year is a new function that accepts a formatter
and returns a formatter that uses provided year by default.
Contributed by lummax.
clj-time.core/InTimeUnitProtocol is a new protocol that provides convenient
functions for time unit conversion:
(defprotocol InTimeUnitProtocol
"Interface for in-<time unit> functions"
(in-millis [this] "Return the time in milliseconds.")
(in-seconds [this] "Return the time in seconds.")
(in-minutes [this] "Return the time in minutes.")
(in-hours [this] "Return the time in hours.")
(in-days [this] "Return the time in days.")
(in-weeks [this] "Return the time in weeks")
(in-months [this] "Return the time in months")
(in-years [this] "Return the time in years"))
clj-time now officially supports Clojure 1.5.1 and later versions.
Joda Time has been upgraded to 2.6.
Can you improve this documentation? These fine people already did:
Sean Corfield, Michael Klishin, Gordon Stratton & Aku KotkavuoEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |