Skip to content
Elixir library focused on working with months, rather than full dates or dates with time.
Elixir
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
lib
test
.formatter.exs
.gitignore
CHANGELOG.md
LICENSE
README.md
mix.exs
mix.lock

README.md

Month hex.pm hexdocs.pm

Library focused on working with months, rather than full dates or dates with time.

Installation

Available in Hex, the package can be installed by adding month to your list of dependencies:

def deps do
  [
    {:month, "~> 2.0"}
  ]
end

Usage

Full documentation is published here: https://hexdocs.pm/month.

However, here is a small sample:

iex> import Month.Sigils
Month.Sigils

iex> Month.utc_now!()
~M[2019-03]

iex> ~M[2019-03].month
3

iex> ~M[2019-03].year
2019

iex> range = Month.Range.new!(~M[2019-01], ~M[2019-03])
#Month.Range<~M[2019-01], ~M[2019-03]>

iex> range.months
[~M[2019-01], ~M[2019-02], ~M[2019-03]]

About

Heresy logo

This project is sponsored by Heresy. We're always looking for great engineers to join our team, so if you love Elixir, open source and enjoy some challenge, drop us a line and say hello!

License

  • Month: See LICENSE file.
  • "Heresy" name and logo: Copyright © 2019 Heresy Software Ltd
You can’t perform that action at this time.