package timedesc

  1. Overview
  2. Docs
type t
type view = private {
  1. hour : int;
  2. minute : int;
  3. second : int;
  4. ns : int;
}
type error = [
  1. | `Invalid_hour of int
  2. | `Invalid_minute of int
  3. | `Invalid_second of int
  4. | `Invalid_s_frac of float
  5. | `Invalid_ns of int
]
exception Error_exn of error

Constructors

val make : ?ns:int -> ?s_frac:float -> hour:int -> minute:int -> second:int -> unit -> (t, error) Stdlib.result
val make_exn : ?ns:int -> ?s_frac:float -> hour:int -> minute:int -> second:int -> unit -> t

Comparison

val equal : t -> t -> bool

Accessors

val view : t -> view
val hour : t -> int
val minute : t -> int
val second : t -> int
val ns : t -> int
val is_leap_second : t -> bool

Conversion

val to_span : t -> Span.t
val of_span : Span.t -> t option
OCaml

Innovation. Community. Security.