Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 23 Apr 03:02
· 96 commits to main since this release

Bug Fixes

  • update localAfterInstall script to remove is-ci check (8b4ff0b)

  • fix!: Update addMonthsToDate to properly handle month boundaries (eb9986c)

Features

  • enhance addMonthsToDate with capToCommonDate option (bd96934)

BREAKING CHANGES

  • Modified addMonthsToDate to properly handle cases where the source date's day doesn't exist in the target month. Instead of letting the date overflow to the next month (previous behavior), the function now clamps
    to the last day of the target month.

For example:

  • Adding 1 month to '2023-01-31' now returns '2023-02-28' instead of '2023-03-03'
  • Adding 3 months to '2023-01-31' now returns '2023-04-30' instead of '2023-05-01'

This ensures more predictable and intuitive date handling when working with
months of different lengths, following common calendar arithmetic conventions.