Skip to content

v0.3.0

Choose a tag to compare

@leemr leemr released this 07 Aug 15:01
· 35 commits to master since this release

ISO 8601 month and weekday numbers, and full months/years counted by add.

Breaking

  • getMonth / setMonth are ISO 1-12 (1 = January), replacing date-fns's 0-11. The number now matches the MM field of the day string.
  • getDay is ISO 1-7 (1 = Monday, 7 = Sunday). Only Sunday changes number.
  • differenceInMonths and differenceInYears count a unit as full when addMonths / addYears would carry the earlier date to the later one. 31 Jan to 28 Feb is 1 month; 29 Feb to 28 Feb of a common year is 1 year.

Not breaking

  • weekStartsOn accepts 1-7 and defaults to 7. 0 still means Sunday, since 0 is congruent to 7 mod 7.
  • differenceInWeeks and differenceInQuarters no longer return -0.

Also carries the range-error fixes unreleased since 0.2.3.

Full detail in CHANGELOG.md and #4.