Liking cljdoc? Tell your friends :D

fogus.time

Utilities dealing with time and durations.

Utilities dealing with time and durations.
raw docstring

days->msclj

(days->ms days)

Returns the number of milliseconds in the given number of days.

Returns the number of milliseconds in the given number of days.
raw docstring

duration->msclj

(duration->ms dur)

Converts a duration component map dur into a total number of milliseconds represented by that duration.

Converts a duration component map dur into a total number of milliseconds
represented by that duration.
raw docstring

hours->msclj

(hours->ms hours)

Returns the number of milliseconds in the given number of hours.

Returns the number of milliseconds in the given number of hours.
raw docstring

minutes->msclj

(minutes->ms minutes)

Returns the number of milliseconds in the given number of minutes.

Returns the number of milliseconds in the given number of minutes.
raw docstring

ms->daysclj

(ms->days)
(ms->days ms)

Returns the number of whole days in a duration of milliseconds ms or the milliseconds in a day when no args provided.

Returns the number of whole days in a duration of milliseconds ms
or the milliseconds in a day when no args provided.
raw docstring

ms->durationclj

(ms->duration ms)

Given a total number of milliseconds ms, returns a map of duration components :weeks, :days, :hours, :minutes, :seconds, and any remaining milliseconds :ms. This function is calendar agnostic and therefore can only supply its coarsest fidelity in weeks.

Given a total number of milliseconds ms, returns a map of duration components
:weeks, :days, :hours, :minutes, :seconds, and any remaining milliseconds :ms.
This function is calendar agnostic and therefore can only supply its coarsest
fidelity in weeks.
raw docstring

ms->hoursclj

(ms->hours)
(ms->hours ms)

Returns the number of whole hours in a duration of milliseconds ms or the milliseconds in an hour when no args provided.

Returns the number of whole hours in a duration of milliseconds ms
or the milliseconds in an hour when no args provided.
raw docstring

ms->minutesclj

(ms->minutes)
(ms->minutes ms)

Returns the number of whole minutes in a duration of milliseconds ms or the milliseconds in a minute when no args provided.

Returns the number of whole minutes in a duration of milliseconds ms
or the milliseconds in a minute when no args provided.
raw docstring

ms->secondsclj

(ms->seconds)
(ms->seconds ms)

Returns the number of whole seconds in a duration of milliseconds ms or the milliseconds in a second when no args provided.

Returns the number of whole seconds in a duration of milliseconds ms
or the milliseconds in a second when no args provided.
raw docstring

ms->weeksclj

(ms->weeks)
(ms->weeks ms)

Returns the number of whole weeks in a duration of milliseconds ms or the milliseconds in a week when no args provided.

Returns the number of whole weeks in a duration of milliseconds ms
or the milliseconds in a week when no args provided.
raw docstring

scale-durationclj

(scale-duration t speed)

Given a duration t in milliseconds and a scale factor speed, returns a scaled duration in milliseconds, rounded to the nearest millisecond per #'clojure.math/round.

Given a duration t in milliseconds and a scale factor speed, returns a scaled
duration in milliseconds, rounded to the nearest millisecond per
#'clojure.math/round.
raw docstring

seconds->msclj

(seconds->ms seconds)

Returns the number of milliseconds in the given number of seconds.

Returns the number of milliseconds in the given number of seconds.
raw docstring

weeks->msclj

(weeks->ms weeks)

Returns the number of milliseconds in the given number of weeks.

Returns the number of milliseconds in the given number of weeks.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close