Liking cljdoc? Tell your friends :D

com.widdindustries.tempo

com.widdindustries.tempo.duration-alpha

significant differences exist between java.time and Temporal wrt amounts of time.

For now, have separate ns.

significant differences exist between java.time and Temporal wrt amounts of time.

For now, have separate ns.

raw docstring

com.widdindustries.tempo.tick

A partial port of tick.core, but now backed by Temporal on js runtime.

If a function from tick is implemented in this ns then it works the same as the tick equivalent.

The reason that tick has been ported is that it is a popular date/time library. As well as having a different basis on JS runtimes, there are some philosophical differences between tick and tempo.

What is there to choose between tempo.tick and tempo?

  1. tempo has no zero-arg 'now' functions. Similarly, there are no functions that make implicit use of the 'current' or 'ambient' zone. For this reason, there is no with-clock macro in tempo

  2. tempo is sometimes more verbose - for example to get the year of an Instant for example first requires converting to a zdt by explicitly supplying a zone.

  3. in tick the same function is used for parsing strings and accessing properties. For example in tick (t/date x) will parse x if it is a string, or access the date from x if it is e.g. a zdt.

  4. tempo blocks non-commutative operations by default (e.g. 'adding' a month to a date)

Other differences:

  • Unlike tick, no entity for year or month exists in tempo - where needed, numbers are used to repsesent those
  • Entities for temporal-amounts are alpha - so not included here yet
  • No parsing or formatting of non-ISO strings - since this is not in Temporal
  • Although there is a timezone entity, functions that would accept or return a timezone instead accept or return a string
  • There are no offset-datetime or offset-time entities since they don't exist in Temporal.
A partial port of tick.core, but now backed by Temporal on js runtime.

If a function from tick is implemented in this ns then it works the same as the tick equivalent.

The reason that tick has been ported is that it is a popular date/time library. As well as having a different basis on JS runtimes,
there are some philosophical differences between tick and tempo. 

What is there to choose between tempo.tick and tempo?

1. tempo has no zero-arg 'now' functions. Similarly, there are no functions that make implicit use of
the 'current' or 'ambient' zone. For this reason, there is no `with-clock` macro in tempo

2. tempo is sometimes more verbose - for example to get the year of an Instant for example first requires converting to a zdt by explicitly supplying a zone.

3. in tick the same function is used for parsing strings and accessing properties. For example in tick `(t/date x)` will parse x if it is a string,
or access the date from x if it is e.g. a zdt.

4. tempo blocks non-commutative operations by default (e.g. 'adding' a month to a date)          

Other differences:

* Unlike tick, no entity for year or month exists in tempo - where needed, numbers are used to repsesent those
* Entities for temporal-amounts are alpha - so not included here yet
* No parsing or formatting of non-ISO strings - since this is not in Temporal
* Although there is a timezone entity, functions that would accept or return a timezone instead accept or return a string
* There are no offset-datetime or offset-time entities since they don't exist in Temporal.

raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close