package mrmime

  1. Overview
  2. Docs

Module Date.MonthSource

Sourcetype t =
  1. | Jan
  2. | Feb
  3. | Mar
  4. | Apr
  5. | May
  6. | Jun
  7. | Jul
  8. | Aug
  9. | Sep
  10. | Oct
  11. | Nov
  12. | Dec
    (*

    Type of month according RFC 822 / RFC 2822 / RFC 5322.

    *)

Constructors.

Sourceval jan : t
Sourceval feb : t
Sourceval mar : t
Sourceval apr : t
Sourceval may : t
Sourceval jun : t
Sourceval jul : t
Sourceval aug : t
Sourceval sep : t
Sourceval oct : t
Sourceval nov : t
Sourceval dec : t
Sourceval to_int : t -> int

to_int m is the number of the month m.

Sourceval of_int : int -> (t, [ `Msg of string ]) result

of_int n returns month of the number n. If n < 1 or n > 12, it returns an error.

Sourceval of_int_exn : int -> t

of_int_exn is an alias on of_int except that if user give an invalid number, we raise an exception.

Sourceval to_string : t -> string

to_stirng v returns a well-formed string from a month v.

Sourceval of_string : string -> (t, [ `Msg of string ]) result

of_string v returns a month from a well-formed string v. Process is case-sensitive, month needs to be capitalized (eg. "Nov").

Sourceval of_string_exn : string -> t

of_string v returns a month from a well-formed string v. Process is case-sensitive, month needs to be capitalized (eg. "Nov").

  • raises [Invalid_argument]

    when v is an invalid month.

Sourceval v : string -> t

Alias of of_string_exn.

Pretty-printers.

Sourceval pp : t Fmt.t

Equals.

Sourceval equal : t -> t -> bool
OCaml

Innovation. Community. Security.