Up

Module Time0

Signature

module Date = Date0
module Unix = Core_unix
module Stable : sig .. end
include Stable.V1
include Time_internal
module Helpers : sig .. end
module T : sig .. end
val float_of_hh_mm_ss : int -> int -> float -> float
val to_tm : T.t -> Unix.tm
val to_tm_utc : T.t -> Unix.tm
val utc_mktime : year:int -> month:int -> day:int -> ofday_sec:float -> float
val to_epoch : T.t -> float
val of_epoch : float -> T.t
module Epoch_cache : sig .. end
val date_ofday_of_epoch_internal : Zone.t -> Core_kernel.Std.Float.t -> Epoch_cache.t * (Date.t * Ofday.t)
val date_ofday_of_epoch : Zone.t -> float -> Date.t * Ofday.t
val to_date_ofday : T.t -> zone:Zone.t -> Date.t * Ofday.t
val to_date_ofday_precise : T.t -> zone:Zone.t -> Date.t * Ofday.t * [>
| `Also_at of T.t
| `Also_skipped of Date.t * Ofday.t
| `Only
]
val of_date_ofday : Date.t -> Ofday.t -> zone:Zone.t -> T.t
val of_date_ofday_precise : Date.t -> Ofday.t -> zone:Zone.t -> [>
| `Never of Time_internal.T.t
| `Once of T.t
| `Twice of T.t * T.t
]
val to_date : T.t -> zone:Zone.t -> Date.t
val to_ofday : T.t -> zone:Zone.t -> Ofday.t
val convert : from_tz:Zone.t -> to_tz:Zone.t -> Date.t -> Ofday.t -> Date.t * Ofday.t
val utc_offset : T.t -> zone:Zone.t -> Span.t
val offset_string : T.t -> zone:Zone.t -> Core_kernel.Std.String.t
val to_string_abs_parts : T.t -> zone:Zone.t -> Core_kernel.Std.String.t list
val to_string_abs_trimmed : T.t -> zone:Zone.t -> Core_kernel.Std.String.t
val to_string_abs : T.t -> zone:Zone.t -> Core_kernel.Std.String.t
val to_string_trimmed : T.t -> zone:Zone.t -> string
val to_sec_string : T.t -> zone:Zone.t -> string
val to_filename_string : T.t -> zone:Zone.t -> string
val to_string_fix_proto : [<
| `Local
| `Utc
] -> T.t -> string
val of_string_fix_proto : [<
| `Local
| `Utc
] -> Core_kernel.Std.String.t -> T.t
val of_filename_string : Core_kernel.Std.String.t -> zone:Zone.t -> T.t
val format : T.t -> string -> zone:Zone.t -> string
val pause_for : Span.t -> [>
| `Ok
| `Remaining of Span.t
]
val pause : Span.t -> unit

Pause and don't allow events to interrupt.

val interruptible_pause : Span.t -> [>
| `Ok
| `Remaining of Span.t
]

Pause but allow events to interrupt.

val pause_forever : unit -> 'a
val occurrence : [<
| `First_after_or_at
| `Last_before_or_at
] -> T.t -> ofday:Ofday.t -> zone:Zone.t -> T.t
val epoch : T.t
include T
type t = private float
val __bin_read_t__ : (int -> t) Core_kernel.Std.Bin_prot.Read.reader
include Core_kernel.Std.Comparable.S_common with type t := t
include Comparable_intf.Polymorphic_compare
include 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
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 Core_kernel.Or_error.t
include Core_kernel.Comparator.S with type t := t
type t
type comparator_witness
include Comparable_intf.Validate with type t := t
type t
val validate_lbound : min:t Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Maybe_bound.t -> t Validate.check
val validate_bound : min:t Maybe_bound.t -> max:t Maybe_bound.t -> t Validate.check
include Core_kernel.Std.Hashable_binable with type t := t
type t
val hash : t -> int
module Table : Hashable.Hashtbl.S_binable with type key = t
include Core_kernel.Std.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
include Core_kernel.Std.Stringable with type t := t
type t
val of_string : string -> t
val to_string : t -> string
include Core_kernel.Std.Floatable with type t := t
type t
val of_float : float -> t
val to_float : t -> float
val add : t -> Span.t -> t
val sub : t -> Span.t -> t
val diff : t -> t -> Span.t
val abs_diff : t -> t -> Span.t
val now : unit -> t
val to_string : T.t -> Core_kernel.Std.String.t
val ensure_colon_in_offset : Core_kernel.Std.String.t -> Core_kernel.Std.String.t
exception Time_of_string of string * Core_kernel.Std.Exn.t
exception Time_string_not_absolute of string
val of_string_gen : if_no_timezone:[<
| `Fail
| `Use_this_one of Zone.t
] -> Core_kernel.Std.String.t -> T.t
val of_string_abs : Core_kernel.Std.String.t -> T.t
val of_string : Core_kernel.Std.String.t -> T.t
val sexp_zone : Zone.t Core_kernel.Std.ref
val get_sexp_zone : unit -> Zone.t
val set_sexp_zone : Zone.t -> unit
val t_of_sexp_gen : if_no_timezone:[<
| `Fail
| `Use_this_one of Zone.t
] -> Core_kernel.Std.Sexp.t -> T.t
val t_of_sexp : Core_kernel.Std.Sexp.t -> T.t
val t_of_sexp_abs : Core_kernel.Std.Sexp.t -> T.t
val sexp_of_t_abs : zone:Zone.t -> T.t -> Core_kernel.Std.Sexp.t
val sexp_of_t : T.t -> Core_kernel.Std.Sexp.t
module C : sig .. end
val is_earlier : t -> than:t -> bool
val is_later : t -> than:t -> bool
module Map : sig .. end
module Set : sig .. end
val pp : Format.formatter -> t -> unit
val of_localized_string : zone:Zone.t -> Core_kernel.Std.String.t -> T.t
val next_multiple : ?can_equal_after:bool -> base:t -> after:t -> interval:Span.t -> unit -> t