Liking cljdoc? Tell your friends :D

periods.core

This namespace focuses entirely on periods. This is not a date/time library.

All period units are plural.

This namespace focuses entirely on periods.
This is not a date/time library.

All period units are plural.
raw docstring

normalizeclj/s

(normalize period)

If a value is outside the normal bounds of a unit, spill over to next unit. e.g. {:hours 25} => {:days 1 :hours 1} {:days 0.5} => {:hours 12} {:hours 1.5} => {:hours 1 :minutes 30} {:hours 1.5 :minutes 30} => {:hours 2}

If a value is outside the normal bounds of a unit, spill over to next unit.
e.g.
{:hours 25} => {:days 1 :hours 1}
{:days 0.5} => {:hours 12}
{:hours 1.5} => {:hours 1 :minutes 30}
{:hours 1.5 :minutes 30} => {:hours 2}
raw docstring

normalize-millisecondsclj/s

(normalize-milliseconds millisecond-period)

period->millisecond-periodclj/s

(period->millisecond-period period)

Convert any period to a period with milliseconds

Convert any period to a period with milliseconds
raw docstring

period-unitsclj/s


shrinkclj/s


shrinking-multiplierclj/s


stringify-periodclj/s

(stringify-period period)
(stringify-period period format-unit)

Not too happy with this API yet. Do not use unless you're willing to deal with breaking changes. reserve the symbol format-period for a future api that makes use of format strings to make usage easier

Not too happy with this API yet. Do not use unless you're willing to deal with breaking changes.
reserve the symbol `format-period` for a future api that makes use of format strings to make usage easier
raw docstring

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

× close