@full-ui/headless-calendar 7.0.0-rc.3 → 7.0.0
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/index.js +6 -6
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as ZonedDateTimeFns from 'temporal-polyfill/fns/
|
|
2
|
-
import * as PlainDateTimeFns from 'temporal-polyfill/fns/
|
|
3
|
-
import * as InstantFns from 'temporal-polyfill/fns/
|
|
1
|
+
import * as ZonedDateTimeFns from 'temporal-polyfill/fns/ZonedDateTime';
|
|
2
|
+
import * as PlainDateTimeFns from 'temporal-polyfill/fns/PlainDateTime';
|
|
3
|
+
import * as InstantFns from 'temporal-polyfill/fns/Instant';
|
|
4
4
|
|
|
5
5
|
// Adding
|
|
6
6
|
function addWeeks(m, n) {
|
|
@@ -823,9 +823,9 @@ class DateEnv {
|
|
|
823
823
|
if (this.timeZone === 'UTC') {
|
|
824
824
|
return new Date(ms);
|
|
825
825
|
}
|
|
826
|
-
const
|
|
826
|
+
const zdt = InstantFns.toZonedDateTimeISO(InstantFns.fromEpochMilliseconds(ms), this.timeZone);
|
|
827
827
|
return new Date(// a "Date Marker", which is like PlainDateTime
|
|
828
|
-
Date.UTC(
|
|
828
|
+
Date.UTC(zdt.year, zdt.month - 1, zdt.day, zdt.hour, zdt.minute, zdt.second, zdt.millisecond));
|
|
829
829
|
}
|
|
830
830
|
offsetForMarker(m) {
|
|
831
831
|
if (this.timeZone === 'local') {
|
|
@@ -844,7 +844,7 @@ class DateEnv {
|
|
|
844
844
|
if (this.timeZone === 'UTC') {
|
|
845
845
|
return new Date(m.valueOf()); // make sure it's a copy
|
|
846
846
|
}
|
|
847
|
-
return new Date(
|
|
847
|
+
return new Date(PlainDateTimeFns.toZonedDateTime(PlainDateTimeFns.create(m.getUTCFullYear(), m.getUTCMonth() + 1, m.getUTCDate(), m.getUTCHours(), m.getUTCMinutes(), m.getUTCSeconds(), m.getUTCMilliseconds()), this.timeZone).epochMilliseconds);
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
850
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@full-ui/headless-calendar",
|
|
3
|
-
"version": "7.0.0
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"headless",
|
|
6
6
|
"calendar",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"title": "Headless Calendar Library",
|
|
10
10
|
"description": "Headless calendar library by the makers of FullCalendar",
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"temporal-polyfill": "^0.
|
|
12
|
+
"temporal-polyfill": "^1.0.1"
|
|
13
13
|
},
|
|
14
14
|
"type": "module",
|
|
15
15
|
"homepage": "https://fullcalendar.io",
|