package timedesc

  1. Overview
  2. Docs
val ptime_span_of_span : Span.t -> Ptime.span option
val ptime_of_timestamp : timestamp -> Ptime.t option
val span_of_ptime_span : Ptime.span -> Span.t

Warning: Subnanosecond information is lost in this conversion

val timestamp_of_ptime : Ptime.t -> timestamp

Warning: Subnanosecond information is lost in this conversion

val day_count_of_year : year:int -> int
val day_count_of_month : year:int -> month:int -> int
val week_count_of_iso_week_year : iso_week_year:int -> int

Month utils

type month = [
  1. | `Jan
  2. | `Feb
  3. | `Mar
  4. | `Apr
  5. | `May
  6. | `Jun
  7. | `Jul
  8. | `Aug
  9. | `Sep
  10. | `Oct
  11. | `Nov
  12. | `Dec
]
val human_int_of_month : month -> int

This yields the usual human readable numbering of 1 to 12 inclusive

val index_of_month : month -> int

This yields the index based numbering of 0 to 11 inclusive

val month_of_human_int : int -> month option
val month_of_index : int -> month option
val weekday_of_tm_int : int -> weekday option
val tm_int_of_weekday : weekday -> int
val weekday_of_iso_int : int -> weekday option
val iso_int_of_weekday : weekday -> int
val get_local_tz_for_arg : unit -> Time_zone.t
val abbr_string_of_weekday : weekday -> string
val is_leap_year : year:int -> bool
val jd_of_ymd : year:int -> month:int -> day:int -> int
val jd_of_date : Date.t -> int
val jd_of_unix_epoch : int
val jd_span_of_unix_epoch : Span.t
OCaml

Innovation. Community. Security.