module Ofday: sig
.. end
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.
type
t = private float
include Comparable_binable
include Floatable
include Hashable_binable
include Robustly_comparable
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
val invariant : t -> t
module Stable: sig
.. end
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_t : t Bin_prot.Type_class.t
val bin_read_t : t Bin_prot.Read_ml.reader
val bin_read_t_ : t Bin_prot.Unsafe_read_c.reader
val bin_read_t__ : (int -> t) Bin_prot.Unsafe_read_c.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_ml.writer
val bin_write_t_ : t Bin_prot.Unsafe_write_c.writer
val bin_writer_t : t Bin_prot.Type_class.writer