Skip to content

Correct day when adding/subtracting month/year

Latest
Compare
Choose a tag to compare
@eirikbacker eirikbacker released this 26 Feb 13:50
· 19 commits to master since this release
  • If a month contains 31 days, and you run +1month, javascript rounds up to the 1st of next month
  • This is not desired behaviour, as we really want to skip one month (both moment and dayjs agrees here)
  • simple-date-parse now adjusts day, to make sure 31 becomes 30 if needed to stay within boundaries