@optionfactory/ful 7.0.4 → 7.0.5
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 +4 -2
- package/dist/ful.iife.js.map +1 -1
- package/dist/ful.iife.min.js +1 -1
- package/dist/ful.iife.min.js.map +1 -1
- package/dist/ful.min.mjs +1 -1
- package/dist/ful.min.mjs.map +1 -1
- package/dist/ful.mjs +4 -2
- package/dist/ful.mjs.map +1 -1
- package/package.json +1 -1
package/dist/ful.iife.js
CHANGED
|
@@ -1700,8 +1700,10 @@ var ful = (function (exports, ftl) {
|
|
|
1700
1700
|
if (!v) {
|
|
1701
1701
|
return '';
|
|
1702
1702
|
}
|
|
1703
|
+
//this could be date.toLocaleDateString('en-CA')
|
|
1704
|
+
const formatLocalDate = (date) => new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toISOString().split("T")[0];
|
|
1703
1705
|
if (v === 'now') {
|
|
1704
|
-
return new Date()
|
|
1706
|
+
return formatLocalDate(new Date());
|
|
1705
1707
|
}
|
|
1706
1708
|
const re = /^([+-])(\d+)([dmy])$/;
|
|
1707
1709
|
const match = re.exec(v);
|
|
@@ -1727,7 +1729,7 @@ var ful = (function (exports, ftl) {
|
|
|
1727
1729
|
r.setFullYear(r.getFullYear() + offset * sign);
|
|
1728
1730
|
break;
|
|
1729
1731
|
}
|
|
1730
|
-
return r
|
|
1732
|
+
return formatLocalDate(r);
|
|
1731
1733
|
}
|
|
1732
1734
|
}
|
|
1733
1735
|
|