@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.iife.js CHANGED
@@ -1706,16 +1706,17 @@ var ful = (function (exports, ftl) {
1706
1706
  const sign = match[1] === "-" ? -1 : 1;
1707
1707
  const offset = +match[2];
1708
1708
  const r = new Date();
1709
+ r.setHours(0, 0, 0, 0);
1709
1710
  switch (match[3]) {
1710
1711
  case 'd':
1711
- const originalDay = r.getDate();
1712
1712
  r.setDate(r.getDate() + offset * sign);
1713
- if (r.getDate() !== originalDay) {
1714
- r.setDate(0);
1715
- }
1716
1713
  break;
1717
1714
  case 'm':
1715
+ const originalDay = r.getDate();
1718
1716
  r.setMonth(r.getMonth() + offset * sign);
1717
+ if (r.getDate() !== originalDay) {
1718
+ r.setDate(0);
1719
+ }
1719
1720
  break;
1720
1721
  case 'y':
1721
1722
  r.setFullYear(r.getFullYear() + offset * sign);