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 Comparable.With_zero
include Floatable
include Hashable_binable
include Pretty_printer.S
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 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
module Stable: sig
.. end
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_t : t Core_kernel.Std.Bin_prot.Type_class.t
val bin_read_t : t Core_kernel.Std.Bin_prot.Read_ml.reader
val bin_read_t_ : t Core_kernel.Std.Bin_prot.Unsafe_read_c.reader
val bin_read_t__ : (int -> t) Core_kernel.Std.Bin_prot.Unsafe_read_c.reader
val bin_reader_t : t Core_kernel.Std.Bin_prot.Type_class.reader
val bin_size_t : t Core_kernel.Std.Bin_prot.Size.sizer
val bin_write_t : t Core_kernel.Std.Bin_prot.Write_ml.writer
val bin_write_t_ : t Core_kernel.Std.Bin_prot.Unsafe_write_c.writer
val bin_writer_t : t Core_kernel.Std.Bin_prot.Type_class.writer
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.
diff t1 t2
returns the difference in time between two ofdays, as if they occurred on
the same day
trailing seconds and subseconds are trimmed off if they are 0
trailing milliseconds are trimmed
with milliseconds