Module Time.Date_and_ofday

type absolute = Core_kernel__Time_float.Time.t
type t = private Core_kernel__Time_float.Time.underlying

Constructors and accessors

val of_date_ofday : Core_kernel__.Date0.t -> Core_kernel__Time_float.Time.Ofday.t -> t
val to_date_ofday : t -> Core_kernel__.Date0.t * Core_kernel__Time_float.Time.Ofday.t
val to_date : t -> Core_kernel__.Date0.t
val to_ofday : t -> Core_kernel__Time_float.Time.Ofday.t

Conversions between absolute times and date + ofday

Based on the offset from UTC at the given time. It is usually simpler to use the Time.Zone wrappers of these conversions.

val of_absolute : absolute -> offset_from_utc:Core_kernel__Time_float.Time.Span.t -> t
val to_absolute : t -> offset_from_utc:Core_kernel__Time_float.Time.Span.t -> absolute

Low-level conversions

Convert between t and a synthetic span representing the difference in date from epoch, times the length of a day, plus the ofday's distance from midnight.

These spans do not correspond with any actual duration of time. Arithmetic on these spans is only meaningful within a range where no DST transitions can occur. For example, rounding to the nearest second makes sense but adding arbitrary spans does not.

These functions are intended for low-level DST transition arithmetic. Most clients should not call these functions directly.

val of_synthetic_span_since_epoch : Core_kernel__Time_float.Time.Span.t -> t
val to_synthetic_span_since_epoch : t -> Core_kernel__Time_float.Time.Span.t