@optionfactory/ful 7.0.2 → 7.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ful.mjs CHANGED
@@ -1705,16 +1705,17 @@ class InputLocalDate extends Input {
1705
1705
  const sign = match[1] === "-" ? -1 : 1;
1706
1706
  const offset = +match[2];
1707
1707
  const r = new Date();
1708
+ r.setHours(0, 0, 0, 0);
1708
1709
  switch (match[3]) {
1709
1710
  case 'd':
1710
- const originalDay = r.getDate();
1711
1711
  r.setDate(r.getDate() + offset * sign);
1712
- if (r.getDate() !== originalDay) {
1713
- r.setDate(0);
1714
- }
1715
1712
  break;
1716
1713
  case 'm':
1714
+ const originalDay = r.getDate();
1717
1715
  r.setMonth(r.getMonth() + offset * sign);
1716
+ if (r.getDate() !== originalDay) {
1717
+ r.setDate(0);
1718
+ }
1718
1719
  break;
1719
1720
  case 'y':
1720
1721
  r.setFullYear(r.getFullYear() + offset * sign);