@fullcalendar/luxon
Advanced tools
Comparing version 6.0.0 to 6.0.1
/*! | ||
FullCalendar Luxon 1 Plugin v6.0.0 | ||
FullCalendar Luxon 1 Plugin v6.0.1 | ||
Docs & License: https://fullcalendar.io/docs/luxon1 | ||
(c) 2022 Adam Shaw | ||
*/ | ||
FullCalendar.Luxon = (function (exports, internal, core, luxon) { | ||
FullCalendar.Luxon = (function (exports, core, luxon, internal) { | ||
'use strict'; | ||
@@ -118,3 +118,3 @@ | ||
internal.globalPlugins.push(plugin); | ||
core.globalPlugins.push(plugin); | ||
@@ -129,2 +129,2 @@ exports["default"] = plugin; | ||
})({}, FullCalendar.Internal, FullCalendar, luxon); | ||
})({}, FullCalendar, luxon, FullCalendar.Internal); |
/*! | ||
FullCalendar Luxon 1 Plugin v6.0.0 | ||
FullCalendar Luxon 1 Plugin v6.0.1 | ||
Docs & License: https://fullcalendar.io/docs/luxon1 | ||
(c) 2022 Adam Shaw | ||
*/ | ||
FullCalendar.Luxon=function(e,t,n,a){"use strict";function l(e,t,n){return a.DateTime.fromObject({zone:t,locale:n,year:e[0],month:e[1]+1,day:e[2],hour:e[3],minute:e[4],second:e[5],millisecond:e[6]})}class r extends t.NamedTimeZoneImpl{offsetForArray(e){return l(e,this.timeZoneName).offset}timestampToArray(e){return[(t=a.DateTime.fromMillis(e,{zone:this.timeZoneName})).year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond];var t}}var o=n.createPlugin({name:"@fullcalendar/luxon",cmdFormatter:function(e,t){let n=function e(t){let n=t.match(/^(.*?)\{(.*)\}(.*)$/);if(n){let t=e(n[2]);return{head:n[1],middle:t,tail:n[3],whole:n[1]+t.whole+n[3]}}return{head:null,middle:null,tail:null,whole:t}}(e);if(t.end){let e=l(t.start.array,t.timeZone,t.localeCodes[0]),a=l(t.end.array,t.timeZone,t.localeCodes[0]);return function e(t,n,a,l){if(t.middle){let r=n(t.head),o=e(t.middle,n,a,l),i=n(t.tail),u=a(t.head),d=e(t.middle,n,a,l),m=a(t.tail);if(r===u&&i===m)return r+(o===d?o:o+l+d)+i}let r=n(t.whole),o=a(t.whole);if(r===o)return r;return r+l+o}(n,e.toFormat.bind(e),a.toFormat.bind(a),t.defaultSeparator)}return l(t.date.array,t.timeZone,t.localeCodes[0]).toFormat(n.whole)},namedTimeZonedImpl:r});return t.globalPlugins.push(o),e.default=o,e.toLuxonDateTime=function(e,n){if(!(n instanceof t.CalendarImpl))throw new Error("must supply a CalendarApi instance");let{dateEnv:l}=n.getCurrentData();return a.DateTime.fromJSDate(e,{zone:l.timeZone,locale:l.locale.codes[0]})},e.toLuxonDuration=function(e,n){if(!(n instanceof t.CalendarImpl))throw new Error("must supply a CalendarApi instance");let{dateEnv:l}=n.getCurrentData();return a.Duration.fromObject(Object.assign(Object.assign({},e),{locale:l.locale.codes[0]}))},Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar.Internal,FullCalendar,luxon); | ||
FullCalendar.Luxon=function(e,t,n,a){"use strict";function l(e,t,a){return n.DateTime.fromObject({zone:t,locale:a,year:e[0],month:e[1]+1,day:e[2],hour:e[3],minute:e[4],second:e[5],millisecond:e[6]})}class r extends a.NamedTimeZoneImpl{offsetForArray(e){return l(e,this.timeZoneName).offset}timestampToArray(e){return[(t=n.DateTime.fromMillis(e,{zone:this.timeZoneName})).year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond];var t}}var o=t.createPlugin({name:"@fullcalendar/luxon",cmdFormatter:function(e,t){let n=function e(t){let n=t.match(/^(.*?)\{(.*)\}(.*)$/);if(n){let t=e(n[2]);return{head:n[1],middle:t,tail:n[3],whole:n[1]+t.whole+n[3]}}return{head:null,middle:null,tail:null,whole:t}}(e);if(t.end){let e=l(t.start.array,t.timeZone,t.localeCodes[0]),a=l(t.end.array,t.timeZone,t.localeCodes[0]);return function e(t,n,a,l){if(t.middle){let r=n(t.head),o=e(t.middle,n,a,l),i=n(t.tail),u=a(t.head),d=e(t.middle,n,a,l),m=a(t.tail);if(r===u&&i===m)return r+(o===d?o:o+l+d)+i}let r=n(t.whole),o=a(t.whole);if(r===o)return r;return r+l+o}(n,e.toFormat.bind(e),a.toFormat.bind(a),t.defaultSeparator)}return l(t.date.array,t.timeZone,t.localeCodes[0]).toFormat(n.whole)},namedTimeZonedImpl:r});return t.globalPlugins.push(o),e.default=o,e.toLuxonDateTime=function(e,t){if(!(t instanceof a.CalendarImpl))throw new Error("must supply a CalendarApi instance");let{dateEnv:l}=t.getCurrentData();return n.DateTime.fromJSDate(e,{zone:l.timeZone,locale:l.locale.codes[0]})},e.toLuxonDuration=function(e,t){if(!(t instanceof a.CalendarImpl))throw new Error("must supply a CalendarApi instance");let{dateEnv:l}=t.getCurrentData();return n.Duration.fromObject(Object.assign(Object.assign({},e),{locale:l.locale.codes[0]}))},Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,luxon,FullCalendar.Internal); |
{ | ||
"name": "@fullcalendar/luxon", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"title": "FullCalendar Luxon 1 Plugin", | ||
@@ -17,3 +17,3 @@ "description": "Enhanced date formatting, conversion, and named time zone functionality with Luxon 1", | ||
"peerDependencies": { | ||
"@fullcalendar/core": "~6.0.0", | ||
"@fullcalendar/core": "~6.0.1", | ||
"luxon": "^1.12.1" | ||
@@ -20,0 +20,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17713