module Ofday: Ofday
type
t = private float
include Binable
include Comparable_binable
include Floatable
include Hashable_binable
include Robustly_comparable
include Sexpable
include Stringable
val create : ?hr:int -> ?min:int -> ?sec:int -> ?ms:int -> ?us:int -> unit -> t
val to_parts : t -> Span.Parts.t
val start_of_day : t
val end_of_day : t
val to_span_since_start_of_day : t -> Span.t
val of_span_since_start_of_day : Span.t -> t
val add : t -> Span.t -> t option
add t s
shifts the time of day t
by the span s
. It returns None if
the result is not in the same day.
val sub : t -> Span.t -> t option
val diff : t -> t -> Span.t
diff t1 t2
returns the difference in time between two ofdays, as if they occurred on
the same day
val to_sec : t -> float
since midnight
val of_sec : float -> t
val pp : Format.formatter -> t -> unit
val small_diff : t -> t -> Span.t
val to_string_trimmed : t -> string
trailing seconds and subseconds are trimmed off if they are 0
val to_sec_string : t -> string
trailing milliseconds are trimmed
val of_string_iso8601_extended : ?pos:int -> ?len:int -> string -> t
val to_millisec_string : t -> string
with milliseconds