Skip to content

v2.0.0

Latest

Choose a tag to compare

@mbklein mbklein released this 03 Jun 18:24
· 2 commits to main since this release
a3a8230

Breaking Changes

  • EDTF.parse/1 now validates that parsed dates correspond to real calendar dates in addition to checking structural format. Previously, values like "1999-02-30" returned {:ok, …}; they now return {:error, :invalid_date}. To opt out of calendar validation, pass validate: false as a second argument: EDTF.parse("1999-02-30", validate: false). The same option is accepted by EDTF.humanize/2. (#41 by @weljoda)

Fixed

  • EDTF.to_date_range/1 now expands unspecified trailing digits to their correct tight span rather than the full year or month. For example, 2020-1X now yields Oct–Dec 2020 and 2020-12-3X yields Dec 30–31. Non-suffix patterns such as 2020-X2 return :unsupported. (#41 by @weljoda)