Liking cljdoc? Tell your friends :D

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

*clock*clj/s


<clj/s


<<clj/s

(<< t n unit)

shift Temporal backward by n units

shift Temporal backward by n units
raw docstring

<=clj/s


>clj/s


>=clj/s

Same as clojure.core/>=, but works on dates, rather than numbers

Same as clojure.core/>=, but works on dates, rather than numbers
raw docstring

>>clj/s

(>> t n unit)

shift Temporal forward by n units

shift Temporal forward by n units
raw docstring

betweenclj/s

(between v1 v2 unit)

the amount of unit between v1 and v2

the amount of unit between v1 and v2
raw docstring

coincident?clj/s

(coincident? start end event)

for the 2-arity ver, Does containing-interval wholly contain the given contained-interval?

for the 3-arity, does the event lie within the span of time described by start and end

for the 2-arity ver, Does containing-interval wholly contain the given contained-interval?

for the 3-arity, does the event lie within the span of time described by start and end
raw docstring

current-clockclj/s

(current-clock)

current-zoneclj/s

(current-zone)

Return the current zone, which can be overridden by the clock dynamic var

Return the current zone, which can be overridden by the *clock* dynamic var
raw docstring

dateclj/s

(date)
(date v)

date-time?clj/s

(date-time? v)

true if v is a date-time?

true if v is a date-time?
raw docstring

date?clj/s

(date? v)

true if v is a date?

true if v is a date?
raw docstring

duration?clj/s

(duration? v)

true if v is a duration?

true if v is a duration?
raw docstring

epochclj/s

(epoch)

Constant for the 1970-01-01T00:00:00Z epoch instant

Constant for the 1970-01-01T00:00:00Z epoch instant
raw docstring

greaterclj/s

(greater x y)

the greater of x and y

the greater of x and y
raw docstring

instclj/s

(inst)

instant?clj/s

(instant? v)

true if v is a instant?

true if v is a instant?
raw docstring

lesserclj/s

(lesser x y)

the lesser of x and y

the lesser of x and y
raw docstring

maxclj/s

(max arg & args)

Find the latest of the given arguments. Callers should ensure that no argument is nil.

Find the latest of the given arguments. Callers should ensure that no
argument is nil.
raw docstring

minclj/s

(min arg & args)

Find the earliest of the given arguments. Callers should ensure that no argument is nil.

Find the earliest of the given arguments. Callers should ensure that no
argument is nil.
raw docstring

new-dateclj/s

(new-date)
(new-date year month day-of-month)

new-timeclj/s

(new-time)
(new-time hour minute)
(new-time hour minute second)

new-year-monthclj/s

(new-year-month)
(new-year-month year month)

nowclj/s

(now)

same as (t/instant)

same as (t/instant)
raw docstring

period?clj/s

(period? v)

true if v is a period?

true if v is a period?
raw docstring

time?clj/s

(time? v)

true if v is a time?

true if v is a time?
raw docstring

todayclj/s

(today)

same as (t/date)

same as (t/date)
raw docstring

truncateclj/s

(truncate x u)

Returns a copy of x truncated to the specified unit.

Returns a copy of x truncated to the specified unit.
raw docstring

withclj/s

(with t fld new-value)

Adjust a temporal with an adjuster or field

Adjust a temporal with an adjuster or field
raw docstring

year-month?clj/s

(year-month? v)

true if v is a year-month?

true if v is a year-month?
raw docstring

zoneclj/s

(zone)

zone?clj/s

(zone? v)

true if v is a zone?

true if v is a zone?
raw docstring

zoned-date-time?clj/s

(zoned-date-time? v)

true if v is a zoned-date-time?

true if v is a zoned-date-time?
raw docstring

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

× close