package timedesc

  1. Overview
  2. Docs

Module Timedesc.UtilsSource

Sourceval ptime_span_of_span : Span.t -> Ptime.span option
Sourceval ptime_of_timestamp : timestamp -> Ptime.t option
Sourceval span_of_ptime_span : Ptime.span -> Span.t

Warning: Subnanosecond information is lost in this conversion

Sourceval timestamp_of_ptime : Ptime.t -> timestamp

Warning: Subnanosecond information is lost in this conversion

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

Month utils

Sourcetype 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
]
Sourceval human_int_of_month : month -> int

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

Sourceval index_of_month : month -> int

This yields the index based numbering of 0 to 11 inclusive

Sourceval month_of_human_int : int -> month option
Sourceval month_of_index : int -> month option
Sourceval weekday_of_tm_int : int -> weekday option
Sourceval tm_int_of_weekday : weekday -> int
Sourceval get_local_tz_for_arg : unit -> Time_zone.t
Sourceval abbr_string_of_weekday : weekday -> string
Sourceval is_leap_year : year:int -> bool
OCaml

Innovation. Community. Security.