Module Ofday

module Ofday: sig .. end
A time of day along with a time zone.

Expresses things like "Seinfeld moved to 6:30pm EST.", while a plain Ofday expresses something more like "I eat lunch at noon (in whichever timezone I'm in at the time).".


type t = private float 
module Zoned: sig .. end
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.reader
val __bin_read_t__ : (int -> t) Core_kernel.Std.Bin_prot.Read.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.writer
val bin_writer_t : t Core_kernel.Std.Bin_prot.Type_class.writer

A time of day along with a time zone.

Expresses things like "Seinfeld moved to 6:30pm EST.", while a plain Ofday expresses something more like "I eat lunch at noon (in whichever timezone I'm in at the time).".

Sexps look like "(12:01 nyc)"

Two t's may or may not correspond to the same times depending on which date they're evaluated.

Strings look like "12:01 nyc"

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