Module Core_kernel__Time_intf.S.Time

type underlying
type t = private underlying
include sig ... end
val typerep_of_t : t Typerep_lib.Std.Typerep.t
val typename_of_t : t Typerep_lib.Std.Typename.t
val compare : t ‑> t ‑> Core_kernel__.Import.int
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (Core_kernel__.Import.int ‑> t) Bin_prot.Read.reader
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_shape_t : Bin_prot.Shape.t
include Core_kernel.Comparable.S_common with type t := t
include Base.Comparable_intf.S
include Base.Comparable_intf.Polymorphic_compare
include Base.Polymorphic_compare_intf.Infix
type t
val (>=) : t ‑> t ‑> bool
val (<=) : t ‑> t ‑> bool
val (=) : t ‑> t ‑> bool
val (>) : t ‑> t ‑> bool
val (<) : t ‑> t ‑> bool
val (<>) : t ‑> t ‑> bool
val equal : t ‑> t ‑> bool
val compare : t ‑> t ‑> int

-1 means "less than", 0 means "equal", 1 means "greater than", and other values should not be returned

val min : t ‑> t ‑> t
val max : t ‑> t ‑> t
val ascending : t ‑> t ‑> int

ascending is identical to compare. descending x y = ascending y x. These are intended to be mnemonic when used like List.sort ~cmp:ascending and List.sort ~cmp:descending, since they cause the list to be sorted in ascending or descending order, respectively.

val descending : t ‑> t ‑> int
val between : t ‑> low:t ‑> high:t ‑> bool
val clamp_exn : t ‑> min:t ‑> max:t ‑> t

clamp_exn t ~min ~max returns t', the closest value to t such that between t' ~low:min ~high:max is true.

Raises if not (min <= max).

val clamp : t ‑> min:t ‑> max:t ‑> t Base.Or_error.t
include Base.Comparator.S with type t := t
type t
type comparator_witness
include Base.Comparable_intf.Validate with type t := t
type t
val validate_lbound : min:t Base.Maybe_bound.t ‑> t Base.Validate.check
val validate_ubound : max:t Base.Maybe_bound.t ‑> t Base.Validate.check
val validate_bound : min:t Base.Maybe_bound.t ‑> max:t Base.Maybe_bound.t ‑> t Base.Validate.check
include Core_kernel__.Std_internal.Robustly_comparable with type t := t
type t
val (>=.) : t ‑> t ‑> bool
val (<=.) : t ‑> t ‑> bool
val (=.) : t ‑> t ‑> bool
val (>.) : t ‑> t ‑> bool
val (<.) : t ‑> t ‑> bool
val (<>.) : t ‑> t ‑> bool
val robustly_compare : t ‑> t ‑> int
module Span : Core_kernel__.Span_intf.Span with type underlying = underlying
module Ofday : Core_kernel__.Ofday_intf.Ofday with type underlying := underlying and module Span := Span
val add : t ‑> Span.t ‑> t
val sub : t ‑> Span.t ‑> t
val diff : t ‑> t ‑> Span.t
val next : t ‑> t

next t returns the next t (forwards in time)

val prev : t ‑> t

prev t returns the previous t (backwards in time)

val to_span_since_epoch : t ‑> Span.t
val of_span_since_epoch : Span.t ‑> t
val utc_mktime : Core_kernel__.Date0.t ‑> Ofday.t ‑> t

Date0.t is the same as Date.t

val to_days_since_epoch_and_remainder : t ‑> Core_kernel__.Import.int * Span.t

returns the amount of time since the epoch in seconds / 86_400 (which is one day in unix time terms) and the (non-negative) remainder as a Span

val now : Core_kernel__.Import.unit ‑> t