Liking cljdoc? Tell your friends :D

tick.protocols


IBetweenclj/sprotocol

betweenclj/s

(between v1 v2)

Return the duration (or period) between two times

Return the duration (or period) between two times
source

IClockclj/sprotocol

clockclj/s

(clock _)

Make a clock

Make a clock
source

IConversionclj/sprotocol

instclj/s

(inst _)

Make a java.util.Date instance.

Make a java.util.Date instance.

instantclj/s

(instant _)

Make a java.time.Instant instance.

Make a java.time.Instant instance.

offset-date-timeclj/s

(offset-date-time _)

Make a java.time.OffsetDateTime instance.

Make a java.time.OffsetDateTime instance.

zoned-date-timeclj/s

(zoned-date-time _)

Make a java.time.ZonedDateTime instance.

Make a java.time.ZonedDateTime instance.
source

IDivisibleclj/sprotocol

divideclj/s

(divide t divisor)

Divide time

Divide time
source

IDivisibleDurationclj/sprotocol

divide-durationclj/s

(divide-duration divisor duration)

Divide a duration

Divide a duration
source

IExtractionclj/sprotocol

minuteclj/s

(minute _)

Return the minute field of the given time

Return the minute field of the given time

dateclj/s

(date _)

Make a java.time.LocalDate instance.

Make a java.time.LocalDate instance.

hourclj/s

(hour _)

Return the hour field of the given time

Return the hour field of the given time

longclj/s

(long _)

Return value as long

Return value as long

date-timeclj/s

(date-time _)

Make a java.time.LocalDateTime instance.

Make a java.time.LocalDateTime instance.

zone-offsetclj/s

(zone-offset _)

Make a java.time.ZoneOffset instance.

Make a java.time.ZoneOffset instance.

intclj/s

(int _)

Return value as integer

Return value as integer

secondclj/s

(second _)

Return the second field of the given time

Return the second field of the given time

zoneclj/s

(zone _)

Make a java.time.ZoneId instance.

Make a java.time.ZoneId instance.

day-of-weekclj/s

(day-of-week _)

Make a java.time.DayOfWeek instance.

Make a java.time.DayOfWeek instance.

timeclj/s

(time _)

Make a java.time.LocalTime instance.

Make a java.time.LocalTime instance.

monthclj/s

(month _)

Make a java.time.Month instance.

Make a java.time.Month instance.

nanosecondclj/s

(nanosecond _)

Return the millisecond field of the given time

Return the millisecond field of the given time

day-of-monthclj/s

(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.

yearclj/s

(year _)

Make a java.time.Year instance.

Make a java.time.Year instance.

millisecondclj/s

(millisecond _)

Return the millisecond field of the given time

Return the millisecond field of the given time

year-monthclj/s

(year-month _)

Make a java.time.YearMonth instance.

Make a java.time.YearMonth instance.

microsecondclj/s

(microsecond _)

Return the millisecond field of the given time

Return the millisecond field of the given time
source

ILocalTimeclj/sprotocol

local?clj/s

(local? t)

Is the time a java.time.LocalTime or java.time.LocalDateTime?

Is the time a java.time.LocalTime or java.time.LocalDateTime?
source

IParseableclj/sprotocol

parseclj/s

(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"))
source

ITimeArithmeticclj/sprotocol

+clj/s

(+ t d)

Sum amounts of time

Sum amounts of time

-clj/s

(- t d)

Subtract from amount of time, or negate

Subtract from amount of time, or negate
source

ITimeComparisonclj/sprotocol

<clj/s

(< x y)

Is x before y?

Is x before y?

<=clj/s

(<= x y)

Is x before or at the same time as y?

Is x before or at the same time as y?

=clj/s

(= x y)

Is x the same as y?

Is x the same as y?

>clj/s

(> x y)

Is x after y?

Is x after y?

>=clj/s

(>= x y)

Is x after or at the same time as y?

Is x after or at the same time as y?
source

ITimeLengthclj/sprotocol

minutesclj/s

(minutes _)

Return the given quantity in minutes.

Return the given quantity in minutes.

millisclj/s

(millis _)

Return the given quantity in milliseconds.

Return the given quantity in milliseconds.

nanosclj/s

(nanos _)

Return the given quantity in nanoseconds.

Return the given quantity in nanoseconds.

monthsclj/s

(months _)

Return the given quantity in months.

Return the given quantity in months.

daysclj/s

(days _)

Return the given quantity in days.

Return the given quantity in days.

secondsclj/s

(seconds _)

Return the given quantity in seconds.

Return the given quantity in seconds.

microsclj/s

(micros _)

Return the given quantity in microseconds.

Return the given quantity in microseconds.

hoursclj/s

(hours _)

Return the given quantity in hours.

Return the given quantity in hours.

yearsclj/s

(years _)

Return the given quantity in years.

Return the given quantity in years.
source

ITimeRangeableclj/sprotocol

rangeclj/s

(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.
source

ITimeReifyclj/sprotocol

atclj/s

(at date time)

Set date to be AT a time

Set date to be AT a time

inclj/s

(in dt zone)

Set a date-time to be in a time-zone

Set a date-time to be in a time-zone

offset-byclj/s

(offset-by dt amount)

Set a date-time to be offset by an amount

Set a date-time to be offset by an amount

onclj/s

(on time date)

Set time be ON a date

Set time be ON a date
source

ITimeShiftclj/sprotocol

backward-durationclj/s

(backward-duration _ d)

Decrement time

Decrement time

backward-numberclj/s

(backward-number _ n)

Decrement time

Decrement time

forward-durationclj/s

(forward-duration _ d)

Increment time

Increment time

forward-numberclj/s

(forward-number _ n)

Increment time

Increment time
source

ITimeSpanclj/sprotocol

beginningclj/s

(beginning _)

Return the beginning of a span of time

Return the beginning of a span of time

endclj/s

(end _)

Return the end of a span of time

Return the end of a span of time
source

ITruncateclj/sprotocol

truncateclj/s

(truncate date-time unit-kw)
source

MinMaxclj/sprotocol

max-of-typeclj/s

(max-of-type _)

Return the max

Return the max

min-of-typeclj/s

(min-of-type _)

Return the min

Return the min
source

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

× close