Module Ptime

type span
module Span : sig ... end
type t
val v : (int * int64) -> t
val epoch : t
val min : t
val max : t
val of_span : span -> t option
val to_span : t -> span
val unsafe_of_d_ps : (int * int64) -> t
val of_float_s : float -> t option
val to_float_s : t -> float
val truncate : frac_s:int -> t -> t
val frac_s : t -> span
val equal : t -> t -> bool
val compare : t -> t -> int
val is_earlier : t -> than:t -> bool
val is_later : t -> than:t -> bool
val add_span : t -> span -> t option
val sub_span : t -> span -> t option
val diff : t -> t -> span
type tz_offset_s = int
type date = int * int * int
type time = (int * int * int) * tz_offset_s
val of_date_time : (date * time) -> t option
val to_date_time : ?tz_offset_s:tz_offset_s -> t -> date * time
val of_date : ?tz_offset_s:tz_offset_s -> date -> t option
val to_date : ?tz_offset_s:tz_offset_s -> t -> date
val of_year : ?tz_offset_s:tz_offset_s -> int -> t option
val to_year : ?tz_offset_s:tz_offset_s -> t -> int
type weekday = [
  1. | `Fri
  2. | `Mon
  3. | `Sat
  4. | `Sun
  5. | `Thu
  6. | `Tue
  7. | `Wed
]
val weekday : ?tz_offset_s:tz_offset_s -> t -> weekday
val weekday_num : ?tz_offset_s:tz_offset_s -> t -> int
type error_range = int * int
type rfc3339_error = [
  1. | `Eoi
  2. | `Exp_chars of char list
  3. | `Invalid_stamp
  4. | `Trailing_input
]
val pp_rfc3339_error : Format.formatter -> rfc3339_error -> unit
val rfc3339_error_to_msg : ('a, [ `RFC3339 of error_range * rfc3339_error ]) result -> ('a, [> `Msg of string ]) result
val rfc3339_string_error : ('a, [ `RFC3339 of error_range * rfc3339_error ]) result -> ('a, string) result
val of_rfc3339 : ?strict:bool -> ?sub:bool -> ?start:int -> string -> (t * tz_offset_s option * int, [> `RFC3339 of error_range * rfc3339_error ]) result
val to_rfc3339 : ?space:bool -> ?frac_s:int -> ?tz_offset_s:tz_offset_s -> t -> string
val pp_rfc3339 : ?space:bool -> ?frac_s:int -> ?tz_offset_s:tz_offset_s -> unit -> Format.formatter -> t -> unit
val pp_human : ?frac_s:int -> ?tz_offset_s:tz_offset_s -> unit -> Format.formatter -> t -> unit
val pp : Format.formatter -> t -> unit
val dump : Format.formatter -> t -> unit