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 : ?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 : Stdlib.Format.formatter -> rfc3339_error -> unit
val rfc3339_error_to_msg : ('a, [ `RFC3339 of error_range * rfc3339_error ]) Stdlib.result -> ('a, [> `Msg of string ]) Stdlib.result
val rfc3339_string_error : ('a, [ `RFC3339 of error_range * rfc3339_error ]) Stdlib.result -> ('a, string) Stdlib.result
val of_rfc3339 : ?strict:bool -> ?sub:bool -> ?start:int -> string -> (t * tz_offset_s option * int, [> `RFC3339 of error_range * rfc3339_error ]) Stdlib.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.