package timere

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
type error = [
  1. | `Invalid_year of int
  2. | `Invalid_day of int
  3. | `Invalid_hour of int
  4. | `Invalid_minute of int
  5. | `Invalid_second of int
  6. | `Invalid_ns of int
  7. | `Invalid_pattern_combination
  8. | `Invalid_tz_info of string option * Timedesc.Span.t
]
exception Error_exn of error
type lean_toward = [
  1. | `Earlier
  2. | `Later
]
val make : ?tz:Timedesc.Time_zone.t -> ?offset_from_utc:Timedesc.Span.t -> ?year:int -> ?month:int -> ?day:int -> ?weekday:Timedesc.weekday -> ?hour:int -> ?minute:int -> ?second:int -> ?ns:int -> lean_toward:lean_toward -> unit -> (t, error) Stdlib.result

Call must be exactly one of the following forms * (ignoring tz, offset_from_utc and lean_toward which are optional in all cases)

make ~year:_                                                       ~lean_toward ()
  make ~year:_ ~month:_                                              ~lean_toward ()
  make ~year:_ ~month:_ ~day:_                                       ~lean_toward ()
  make ~year:_ ~month:_ ~day:_     ~hour:_                           ~lean_toward ()
  make ~year:_ ~month:_ ~day:_     ~hour:_ ~minute:_                 ~lean_toward ()
  make ~year:_ ~month:_ ~day:_     ~hour:_ ~minute:_ ~second:_       ~lean_toward ()
  make ~year:_ ~month:_ ~day:_     ~hour:_ ~minute:_ ~second:_ ~ns:_ ~lean_toward ()

  make         ~month:_                                              ~lean_toward ()
  make         ~month:_ ~day:_                                       ~lean_toward ()
  make         ~month:_ ~day:_     ~hour:_                           ~lean_toward ()
  make         ~month:_ ~day:_     ~hour:_ ~minute:_                 ~lean_toward ()
  make         ~month:_ ~day:_     ~hour:_ ~minute:_ ~second:_       ~lean_toward ()
  make         ~month:_ ~day:_     ~hour:_ ~minute:_ ~second:_ ~ns:_ ~lean_toward ()

  make                  ~day:_                                       ~lean_toward ()
  make                  ~day:_     ~hour:_                           ~lean_toward ()
  make                  ~day:_     ~hour:_ ~minute:_                 ~lean_toward ()
  make                  ~day:_     ~hour:_ ~minute:_ ~second:_       ~lean_toward ()
  make                  ~day:_     ~hour:_ ~minute:_ ~second:_ ~ns:_ ~lean_toward ()

  make                  ~weekday:_                                   ~lean_toward ()
  make                  ~weekday:_ ~hour:_                           ~lean_toward ()
  make                  ~weekday:_ ~hour:_ ~minute:_                 ~lean_toward ()
  make                  ~weekday:_ ~hour:_ ~minute:_ ~second:_       ~lean_toward ()
  make                  ~weekday:_ ~hour:_ ~minute:_ ~second:_ ~ns:_ ~lean_toward ()

  make                             ~hour:_                           ~lean_toward ()
  make                             ~hour:_ ~minute:_                 ~lean_toward ()
  make                             ~hour:_ ~minute:_ ~second:_       ~lean_toward ()
  make                             ~hour:_ ~minute:_ ~second:_ ~ns:_ ~lean_toward ()

  make                                     ~minute:_                 ~lean_toward ()
  make                                     ~minute:_ ~second:_       ~lean_toward ()
  make                                     ~minute:_ ~second:_ ~ns:_ ~lean_toward ()

  make                                               ~second:_       ~lean_toward ()
  make                                               ~second:_ ~ns:_ ~lean_toward ()

  make                                                         ~ns:_ ~lean_toward ()

returns Error otherwise

val make_exn : ?tz:Timedesc.Time_zone.t -> ?offset_from_utc:Timedesc.Span.t -> ?year:int -> ?month:int -> ?day:int -> ?weekday:Timedesc.weekday -> ?hour:int -> ?minute:int -> ?second:int -> ?ns:int -> lean_toward:lean_toward -> unit -> t
OCaml

Innovation. Community. Security.