package tls

  1. Overview
  2. Docs
include module type of struct include Ptime end
type span = Ptime.span
module Span = Ptime.Span
type t = Ptime.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 : date -> t option
val to_date : t -> date
val weekday : ?tz_offset_s:tz_offset_s -> t -> [ `Fri | `Mon | `Sat | `Sun | `Thu | `Tue | `Wed ]
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 : Stdlib.Format.formatter -> rfc3339_error -> unit
val rfc3339_error_to_msg : ('a, [ `RFC3339 of error_range * rfc3339_error ]) Result.result -> ('a, [> `Msg of string ]) Result.result
val of_rfc3339 : ?strict:bool -> ?sub:bool -> ?start:int -> string -> (t * tz_offset_s option * int, [> `RFC3339 of error_range * rfc3339_error ]) Result.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 -> Stdlib.Format.formatter -> t -> unit
val pp_human : ?frac_s:int -> ?tz_offset_s:tz_offset_s -> unit -> Stdlib.Format.formatter -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
val dump : Stdlib.Format.formatter -> t -> unit
val sexp_of_t : Ptime.t -> Sexplib.Sexp.t
OCaml

Innovation. Community. Security.