Month.Sigils (Month v2.2.0)

Copy Markdown View Source

Contains sigils only, for convenience.

Summary

Functions

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

Functions

sigil_M(string, list)

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]}