(between v1 v2)
Return the duration (or period) between two times
Return the duration (or period) between two times
(clock _)
Make a clock
Make a clock
(inst _)
Make a java.util.Date instance.
Make a java.util.Date instance.
(instant _)
Make a java.time.Instant instance.
Make a java.time.Instant instance.
(offset-date-time _)
Make a java.time.OffsetDateTime instance.
Make a java.time.OffsetDateTime instance.
(zoned-date-time _)
Make a java.time.ZonedDateTime instance.
Make a java.time.ZonedDateTime instance.
(divide t divisor)
Divide time
Divide time
(divide-duration divisor duration)
Divide a duration
Divide a duration
(minute _)
Return the minute field of the given time
Return the minute field of the given time
(date _)
Make a java.time.LocalDate instance.
Make a java.time.LocalDate instance.
(hour _)
Return the hour field of the given time
Return the hour field of the given time
(long _)
Return value as long
Return value as long
(date-time _)
Make a java.time.LocalDateTime instance.
Make a java.time.LocalDateTime instance.
(zone-offset _)
Make a java.time.ZoneOffset instance.
Make a java.time.ZoneOffset instance.
(int _)
Return value as integer
Return value as integer
(second _)
Return the second field of the given time
Return the second field of the given time
(zone _)
Make a java.time.ZoneId instance.
Make a java.time.ZoneId instance.
(day-of-week _)
Make a java.time.DayOfWeek instance.
Make a java.time.DayOfWeek instance.
(time _)
Make a java.time.LocalTime instance.
Make a java.time.LocalTime instance.
(month _)
Make a java.time.Month instance.
Make a java.time.Month instance.
(nanosecond _)
Return the millisecond field of the given time
Return the millisecond field of the given time
(day-of-month _)
Return value of the day in the month as an integer.
Return value of the day in the month as an integer.
(year _)
Make a java.time.Year instance.
Make a java.time.Year instance.
(millisecond _)
Return the millisecond field of the given time
Return the millisecond field of the given time
(year-month _)
Make a java.time.YearMonth instance.
Make a java.time.YearMonth instance.
(microsecond _)
Return the millisecond field of the given time
Return the millisecond field of the given time
(local? t)
Is the time a java.time.LocalTime or java.time.LocalDateTime?
Is the time a java.time.LocalTime or java.time.LocalDateTime?
(parse _)
Parse is not in the main api because it is slow and may give surprising behaviour.
Various tick functions in the public api (e.g between) still accept strings as arguments and will attempt
to parse the args into an applicable date/time entity before carrying out the main work of the
function. Calling these functions with strings is not recommended but has been kept for backward
compatibility.
Parse to most applicable instance.
Do not use this function if you know the expected format of the string
that you want to parse. This is partly because for example t/instant, t/date etc will be much faster, but also because if the string you pass it is not in the format you expect, this function may still convert it into some entity that you weren't expecting.
If you have a string in a non-standard format, use a formatter and the parse fn of they entity you want.
For example:
(cljc.java-time.local-date/parse "20200202" (t/formatter "yyyyMMdd"))
Parse is not in the main api because it is slow and may give surprising behaviour. Various tick functions in the public api (e.g between) still accept strings as arguments and will attempt to parse the args into an applicable date/time entity before carrying out the main work of the function. Calling these functions with strings is not recommended but has been kept for backward compatibility. Parse to most applicable instance. Do not use this function if you know the expected format of the string that you want to parse. This is partly because for example t/instant, t/date etc will be much faster, but also because if the string you pass it is not in the format you expect, this function may still convert it into some entity that you weren't expecting. If you have a string in a non-standard format, use a formatter and the parse fn of they entity you want. For example: (cljc.java-time.local-date/parse "20200202" (t/formatter "yyyyMMdd"))
(+ t d)
Sum amounts of time
Sum amounts of time
(- t d)
Subtract from amount of time, or negate
Subtract from amount of time, or negate
(< x y)
Is x before y?
Is x before y?
(<= x y)
Is x before or at the same time as y?
Is x before or at the same time as y?
(= x y)
Is x the same as y?
Is x the same as y?
(> x y)
Is x after y?
Is x after y?
(>= x y)
Is x after or at the same time as y?
Is x after or at the same time as y?
(minutes _)
Return the given quantity in minutes.
Return the given quantity in minutes.
(millis _)
Return the given quantity in milliseconds.
Return the given quantity in milliseconds.
(nanos _)
Return the given quantity in nanoseconds.
Return the given quantity in nanoseconds.
(months _)
Return the given quantity in months.
Return the given quantity in months.
(days _)
Return the given quantity in days.
Return the given quantity in days.
(seconds _)
Return the given quantity in seconds.
Return the given quantity in seconds.
(micros _)
Return the given quantity in microseconds.
Return the given quantity in microseconds.
(hours _)
Return the given quantity in hours.
Return the given quantity in hours.
(years _)
Return the given quantity in years.
Return the given quantity in years.
(range from)
(range from to)
(range from to step)
Returns a lazy seq of times from start (inclusive) to end (exclusive, nil means forever), by step, where start defaults to 0, step to 1, and end to infinity.
Returns a lazy seq of times from start (inclusive) to end (exclusive, nil means forever), by step, where start defaults to 0, step to 1, and end to infinity.
(at date time)
Set date to be AT a time
Set date to be AT a time
(in dt zone)
Set a date-time to be in a time-zone
Set a date-time to be in a time-zone
(offset-by dt amount)
Set a date-time to be offset by an amount
Set a date-time to be offset by an amount
(on time date)
Set time be ON a date
Set time be ON a date
(backward-duration _ d)
Decrement time
Decrement time
(backward-number _ n)
Decrement time
Decrement time
(forward-duration _ d)
Increment time
Increment time
(forward-number _ n)
Increment time
Increment time
(beginning _)
Return the beginning of a span of time
Return the beginning of a span of time
(end _)
Return the end of a span of time
Return the end of a span of time
(truncate date-time unit-kw)
(max-of-type _)
Return the max
Return the max
(min-of-type _)
Return the min
Return the min
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close