(abuts? i oi)
True if this interval abut with the other one
True if this interval abut with the other one
(contains? i o)
True if the interval contains the given instant or interval
True if the interval contains the given instant or interval
(end i)
Gets the end instant of the interval
Gets the end instant of the interval
(gap i oi)
Gets the gap between this interval and the other one or nil
Gets the gap between this interval and the other one or `nil`
(interval o)
(interval a b)
Constructs an interval out of a string, start and end instants or a start
(j/interval "2010-01-01T00:00:00Z/2013-01-01T00:00:00Z") => #<Interval 2010-01-01T00:00:00Z/2013-01-01T00:00:00Z>
(j/interval (j/instant 100000) (j/instant 1000000)) => #<Interval 1970-01-01T00:01:40Z/1970-01-01T00:16:40Z>
(j/interval (j/instant 100000) (j/duration 15 :minutes)) => #<Interval 1970-01-01T00:01:40Z/1970-01-01T00:16:40Z>
Requires the optional threeten-extra
dependency.
Constructs an interval out of a string, start and end instants or a start + duration: (j/interval "2010-01-01T00:00:00Z/2013-01-01T00:00:00Z") => #<Interval 2010-01-01T00:00:00Z/2013-01-01T00:00:00Z> (j/interval (j/instant 100000) (j/instant 1000000)) => #<Interval 1970-01-01T00:01:40Z/1970-01-01T00:16:40Z> (j/interval (j/instant 100000) (j/duration 15 :minutes)) => #<Interval 1970-01-01T00:01:40Z/1970-01-01T00:16:40Z> Requires the optional `threeten-extra` dependency.
(move-end-by i & os)
Moves the end instant of the interval by the sum of given periods/durations/numbers of milliseconds.
(move-start-by (interval 0 10000) (millis 1000) (seconds 1)) => #<Interval ...:00Z/...:12Z>
Fails if the new end instant falls before the start instant.
(move-end-by (interval 0 10000) (millis -11000)) => DateTimeException...
Moves the end instant of the interval by the sum of given periods/durations/numbers of milliseconds. (move-start-by (interval 0 10000) (millis 1000) (seconds 1)) => #<Interval ...:00Z/...:12Z> Fails if the new end instant falls before the start instant. (move-end-by (interval 0 10000) (millis -11000)) => DateTimeException...
(move-end-to i new-end)
Moves the end of the interval to the given instant (or something convertible to an instant):
(move-end-to (interval 0 10000) (instant 15000)) => #<Interval ...:00Z/...:15Z>
Fails if the new end instant falls before the start instant:
(move-end-to (interval 0 10000) (millis -1)) => DateTimeException...
Moves the end of the interval to the given instant (or something convertible to an instant): (move-end-to (interval 0 10000) (instant 15000)) => #<Interval ...:00Z/...:15Z> Fails if the new end instant falls before the start instant: (move-end-to (interval 0 10000) (millis -1)) => DateTimeException...
(move-start-by i & os)
Moves the start instant of the interval by the sum of given periods/durations/numbers of milliseconds:
(move-start-by (interval 0 10000) (millis 1000) (seconds 1)) => #<Interval ...:02Z/...:10Z>
Fails if the new start instant falls after the end instant.
(move-start-by (interval 0 10000) (millis 11000)) ; => DateTimeException...
Moves the start instant of the interval by the sum of given periods/durations/numbers of milliseconds: (move-start-by (interval 0 10000) (millis 1000) (seconds 1)) => #<Interval ...:02Z/...:10Z> Fails if the new start instant falls after the end instant. (move-start-by (interval 0 10000) (millis 11000)) ; => DateTimeException...
(move-start-to i new-start)
Moves the start instant of the interval to the given instant (or something convertible to an instant):
(move-start-to (interval 0 10000) (instant 5000)) => #<Interval ...:05Z/...:10Z>
Fails if the new start instant falls after the end instant:
(move-start-to (interval 0 10000) (millis 15000)) => DateTimeException...
Moves the start instant of the interval to the given instant (or something convertible to an instant): (move-start-to (interval 0 10000) (instant 5000)) => #<Interval ...:05Z/...:10Z> Fails if the new start instant falls after the end instant: (move-start-to (interval 0 10000) (millis 15000)) => DateTimeException...
(overlap i oi)
Gets the overlap between this interval and the other one or nil
Gets the overlap between this interval and the other one or `nil`
(overlaps? i oi)
True if this interval overlaps the other one
True if this interval overlaps the other one
(seq-move-end-by i os)
Use move-end-by
with vararags
Use `move-end-by` with vararags
(seq-move-start-by i os)
Use move-start-by
with vararags
Use `move-start-by` with vararags
(start i)
Gets the start instant of the interval
Gets the start instant of the interval
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close