Month v2.1.0 Month.Sigils View Source

Contains sigils only, for convenience.

Link to this section Summary

Functions

Constructs a %Month{} struct using the ~M sigil

Link to this section Functions

Constructs a %Month{} struct using the ~M sigil.

Uses new!/2 behind the scenes so will throw an exception on invalid input.

Examples

iex> import Month
Month
iex> month = ~M[2019-03]
~M[2019-03]
iex> Month.add(month, 3)
{:ok, ~M[2019-06]}