@internationalized/date
Advanced tools
Comparing version 3.5.4-nightly.4624 to 3.5.4
@@ -36,3 +36,3 @@ var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js"); | ||
return [ | ||
"BE" | ||
'BE' | ||
]; | ||
@@ -46,3 +46,3 @@ } | ||
super(...args); | ||
this.identifier = "buddhist"; | ||
this.identifier = 'buddhist'; | ||
} | ||
@@ -49,0 +49,0 @@ } |
@@ -30,3 +30,3 @@ import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f} from "./CalendarDate.module.js"; | ||
return [ | ||
"BE" | ||
'BE' | ||
]; | ||
@@ -40,3 +40,3 @@ } | ||
super(...args); | ||
this.identifier = "buddhist"; | ||
this.identifier = 'buddhist'; | ||
} | ||
@@ -43,0 +43,0 @@ } |
@@ -34,5 +34,5 @@ var $5c0571aa5b6fb5da$exports = require("./manipulation.main.js"); | ||
function $625ad1e1f4c43bc1$var$shiftArgs(args) { | ||
let calendar = typeof args[0] === "object" ? args.shift() : new (0, $af14c9812fdceb33$exports.GregorianCalendar)(); | ||
let calendar = typeof args[0] === 'object' ? args.shift() : new (0, $af14c9812fdceb33$exports.GregorianCalendar)(); | ||
let era; | ||
if (typeof args[0] === "string") era = args.shift(); | ||
if (typeof args[0] === 'string') era = args.shift(); | ||
else { | ||
@@ -163,6 +163,6 @@ let eras = calendar.getEras(); | ||
switch(field){ | ||
case "era": | ||
case "year": | ||
case "month": | ||
case "day": | ||
case 'era': | ||
case 'year': | ||
case 'month': | ||
case 'day': | ||
return (0, $5c0571aa5b6fb5da$exports.cycleDate)(this, field, amount, options); | ||
@@ -169,0 +169,0 @@ default: |
@@ -25,5 +25,5 @@ import {add as $735220c2d4774dd3$export$e16d8520af44a096, addTime as $735220c2d4774dd3$export$7ed87b6bc2506470, addZoned as $735220c2d4774dd3$export$96b1d28349274637, constrain as $735220c2d4774dd3$export$c4e2ecac49351ef2, constrainTime as $735220c2d4774dd3$export$7555de1e070510cb, cycleDate as $735220c2d4774dd3$export$d52ced6badfb9a4c, cycleTime as $735220c2d4774dd3$export$dd02b3e0007dfe28, cycleZoned as $735220c2d4774dd3$export$9a297d111fc86b79, set as $735220c2d4774dd3$export$adaa4cf7ef1b65be, setTime as $735220c2d4774dd3$export$e5d5e1c1822b6e56, setZoned as $735220c2d4774dd3$export$31b5430eb18be4f8, subtract as $735220c2d4774dd3$export$4e2d2ead65e5f7e3, subtractTime as $735220c2d4774dd3$export$fe34d3a381cd7501, subtractZoned as $735220c2d4774dd3$export$6814caac34ca03c7} from "./manipulation.module.js"; | ||
function $35ea8db9cb2ccb90$var$shiftArgs(args) { | ||
let calendar = typeof args[0] === "object" ? args.shift() : new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)(); | ||
let calendar = typeof args[0] === 'object' ? args.shift() : new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)(); | ||
let era; | ||
if (typeof args[0] === "string") era = args.shift(); | ||
if (typeof args[0] === 'string') era = args.shift(); | ||
else { | ||
@@ -154,6 +154,6 @@ let eras = calendar.getEras(); | ||
switch(field){ | ||
case "era": | ||
case "year": | ||
case "month": | ||
case "day": | ||
case 'era': | ||
case 'year': | ||
case 'month': | ||
case 'day': | ||
return (0, $735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options); | ||
@@ -160,0 +160,0 @@ default: |
@@ -56,3 +56,3 @@ var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js"); | ||
// Fast path for UTC. | ||
if (timeZone === "UTC") return 0; | ||
if (timeZone === 'UTC') return 0; | ||
// Fast path: for local timezone after 1970, use native Date. | ||
@@ -68,12 +68,12 @@ if (ms > 0 && timeZone === (0, $1f0f7ebf1ae6c530$exports.getLocalTimeZone)()) return new Date(ms).getTimezoneOffset() * -60000; | ||
if (!formatter) { | ||
formatter = new Intl.DateTimeFormat("en-US", { | ||
formatter = new Intl.DateTimeFormat('en-US', { | ||
timeZone: timeZone, | ||
hour12: false, | ||
era: "short", | ||
year: "numeric", | ||
month: "numeric", | ||
day: "numeric", | ||
hour: "numeric", | ||
minute: "numeric", | ||
second: "numeric" | ||
era: 'short', | ||
year: 'numeric', | ||
month: 'numeric', | ||
day: 'numeric', | ||
hour: 'numeric', | ||
minute: 'numeric', | ||
second: 'numeric' | ||
}); | ||
@@ -84,9 +84,9 @@ $4ae0260a69729f1d$var$formattersByTimeZone.set(timeZone, formatter); | ||
let namedParts = {}; | ||
for (let part of parts)if (part.type !== "literal") namedParts[part.type] = part.value; | ||
for (let part of parts)if (part.type !== 'literal') namedParts[part.type] = part.value; | ||
return { | ||
// Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253 | ||
year: namedParts.era === "BC" || namedParts.era === "B" ? -namedParts.year + 1 : +namedParts.year, | ||
year: namedParts.era === 'BC' || namedParts.era === 'B' ? -namedParts.year + 1 : +namedParts.year, | ||
month: +namedParts.month, | ||
day: +namedParts.day, | ||
hour: namedParts.hour === "24" ? 0 : +namedParts.hour, | ||
hour: namedParts.hour === '24' ? 0 : +namedParts.hour, | ||
minute: +namedParts.minute, | ||
@@ -116,8 +116,8 @@ second: +namedParts.second | ||
} | ||
function $4ae0260a69729f1d$export$5107c82f94518f5c(date, timeZone, disambiguation = "compatible") { | ||
function $4ae0260a69729f1d$export$5107c82f94518f5c(date, timeZone, disambiguation = 'compatible') { | ||
let dateTime = $4ae0260a69729f1d$export$b21e0b124e224484(date); | ||
// Fast path: if the time zone is UTC, use native Date. | ||
if (timeZone === "UTC") return $4ae0260a69729f1d$export$bd4fb2bc8bb06fb(dateTime); | ||
if (timeZone === 'UTC') return $4ae0260a69729f1d$export$bd4fb2bc8bb06fb(dateTime); | ||
// Fast path: if the time zone is the local timezone and disambiguation is compatible, use native Date. | ||
if (timeZone === (0, $1f0f7ebf1ae6c530$exports.getLocalTimeZone)() && disambiguation === "compatible") { | ||
if (timeZone === (0, $1f0f7ebf1ae6c530$exports.getLocalTimeZone)() && disambiguation === 'compatible') { | ||
dateTime = $4ae0260a69729f1d$export$b4a036af3fc0b032(dateTime, new (0, $af14c9812fdceb33$exports.GregorianCalendar)()); | ||
@@ -138,22 +138,22 @@ // Don't use Date constructor here because two-digit years are interpreted in the 20th century. | ||
// 'compatible' means 'earlier' for "fall back" transitions | ||
case "compatible": | ||
case "earlier": | ||
case 'compatible': | ||
case 'earlier': | ||
return valid[0]; | ||
case "later": | ||
case 'later': | ||
return valid[valid.length - 1]; | ||
case "reject": | ||
throw new RangeError("Multiple possible absolute times found"); | ||
case 'reject': | ||
throw new RangeError('Multiple possible absolute times found'); | ||
} | ||
switch(disambiguation){ | ||
case "earlier": | ||
case 'earlier': | ||
return Math.min(ms - offsetBefore, ms - offsetAfter); | ||
// 'compatible' means 'later' for "spring forward" transitions | ||
case "compatible": | ||
case "later": | ||
case 'compatible': | ||
case 'later': | ||
return Math.max(ms - offsetBefore, ms - offsetAfter); | ||
case "reject": | ||
throw new RangeError("No such absolute time found"); | ||
case 'reject': | ||
throw new RangeError('No such absolute time found'); | ||
} | ||
} | ||
function $4ae0260a69729f1d$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = "compatible") { | ||
function $4ae0260a69729f1d$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = 'compatible') { | ||
return new Date($4ae0260a69729f1d$export$5107c82f94518f5c(dateTime, timeZone, disambiguation)); | ||
@@ -200,4 +200,4 @@ } | ||
let hour = 0, minute = 0, second = 0, millisecond = 0; | ||
if ("timeZone" in date) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = date); | ||
else if ("hour" in date && !time) return date; | ||
if ('timeZone' in date) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = date); | ||
else if ('hour' in date && !time) return date; | ||
if (time) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = time); | ||
@@ -204,0 +204,0 @@ return new (0, $625ad1e1f4c43bc1$exports.CalendarDateTime)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond); |
@@ -37,3 +37,3 @@ import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f, CalendarDateTime as $35ea8db9cb2ccb90$export$ca871e8dbb80966f, Time as $35ea8db9cb2ccb90$export$680ea196effce5f, ZonedDateTime as $35ea8db9cb2ccb90$export$d3b7288e7994edea} from "./CalendarDate.module.js"; | ||
// Fast path for UTC. | ||
if (timeZone === "UTC") return 0; | ||
if (timeZone === 'UTC') return 0; | ||
// Fast path: for local timezone after 1970, use native Date. | ||
@@ -49,12 +49,12 @@ if (ms > 0 && timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)()) return new Date(ms).getTimezoneOffset() * -60000; | ||
if (!formatter) { | ||
formatter = new Intl.DateTimeFormat("en-US", { | ||
formatter = new Intl.DateTimeFormat('en-US', { | ||
timeZone: timeZone, | ||
hour12: false, | ||
era: "short", | ||
year: "numeric", | ||
month: "numeric", | ||
day: "numeric", | ||
hour: "numeric", | ||
minute: "numeric", | ||
second: "numeric" | ||
era: 'short', | ||
year: 'numeric', | ||
month: 'numeric', | ||
day: 'numeric', | ||
hour: 'numeric', | ||
minute: 'numeric', | ||
second: 'numeric' | ||
}); | ||
@@ -65,9 +65,9 @@ $11d87f3f76e88657$var$formattersByTimeZone.set(timeZone, formatter); | ||
let namedParts = {}; | ||
for (let part of parts)if (part.type !== "literal") namedParts[part.type] = part.value; | ||
for (let part of parts)if (part.type !== 'literal') namedParts[part.type] = part.value; | ||
return { | ||
// Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253 | ||
year: namedParts.era === "BC" || namedParts.era === "B" ? -namedParts.year + 1 : +namedParts.year, | ||
year: namedParts.era === 'BC' || namedParts.era === 'B' ? -namedParts.year + 1 : +namedParts.year, | ||
month: +namedParts.month, | ||
day: +namedParts.day, | ||
hour: namedParts.hour === "24" ? 0 : +namedParts.hour, | ||
hour: namedParts.hour === '24' ? 0 : +namedParts.hour, | ||
minute: +namedParts.minute, | ||
@@ -97,8 +97,8 @@ second: +namedParts.second | ||
} | ||
function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = "compatible") { | ||
function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = 'compatible') { | ||
let dateTime = $11d87f3f76e88657$export$b21e0b124e224484(date); | ||
// Fast path: if the time zone is UTC, use native Date. | ||
if (timeZone === "UTC") return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime); | ||
if (timeZone === 'UTC') return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime); | ||
// Fast path: if the time zone is the local timezone and disambiguation is compatible, use native Date. | ||
if (timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === "compatible") { | ||
if (timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === 'compatible') { | ||
dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)()); | ||
@@ -119,22 +119,22 @@ // Don't use Date constructor here because two-digit years are interpreted in the 20th century. | ||
// 'compatible' means 'earlier' for "fall back" transitions | ||
case "compatible": | ||
case "earlier": | ||
case 'compatible': | ||
case 'earlier': | ||
return valid[0]; | ||
case "later": | ||
case 'later': | ||
return valid[valid.length - 1]; | ||
case "reject": | ||
throw new RangeError("Multiple possible absolute times found"); | ||
case 'reject': | ||
throw new RangeError('Multiple possible absolute times found'); | ||
} | ||
switch(disambiguation){ | ||
case "earlier": | ||
case 'earlier': | ||
return Math.min(ms - offsetBefore, ms - offsetAfter); | ||
// 'compatible' means 'later' for "spring forward" transitions | ||
case "compatible": | ||
case "later": | ||
case 'compatible': | ||
case 'later': | ||
return Math.max(ms - offsetBefore, ms - offsetAfter); | ||
case "reject": | ||
throw new RangeError("No such absolute time found"); | ||
case 'reject': | ||
throw new RangeError('No such absolute time found'); | ||
} | ||
} | ||
function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = "compatible") { | ||
function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = 'compatible') { | ||
return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime, timeZone, disambiguation)); | ||
@@ -181,4 +181,4 @@ } | ||
let hour = 0, minute = 0, second = 0, millisecond = 0; | ||
if ("timeZone" in date) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = date); | ||
else if ("hour" in date && !time) return date; | ||
if ('timeZone' in date) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = date); | ||
else if ('hour' in date && !time) return date; | ||
if (time) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = time); | ||
@@ -185,0 +185,0 @@ return new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond); |
@@ -38,27 +38,27 @@ var $561c4ef058278b74$exports = require("./BuddhistCalendar.main.js"); | ||
switch(name){ | ||
case "buddhist": | ||
case 'buddhist': | ||
return new (0, $561c4ef058278b74$exports.BuddhistCalendar)(); | ||
case "ethiopic": | ||
case 'ethiopic': | ||
return new (0, $4db04d1051af0f2f$exports.EthiopicCalendar)(); | ||
case "ethioaa": | ||
case 'ethioaa': | ||
return new (0, $4db04d1051af0f2f$exports.EthiopicAmeteAlemCalendar)(); | ||
case "coptic": | ||
case 'coptic': | ||
return new (0, $4db04d1051af0f2f$exports.CopticCalendar)(); | ||
case "hebrew": | ||
case 'hebrew': | ||
return new (0, $0f5324ee3bdd9396$exports.HebrewCalendar)(); | ||
case "indian": | ||
case 'indian': | ||
return new (0, $5f1dfa5c67609fe6$exports.IndianCalendar)(); | ||
case "islamic-civil": | ||
case 'islamic-civil': | ||
return new (0, $ecb2c4cc8c9aae25$exports.IslamicCivilCalendar)(); | ||
case "islamic-tbla": | ||
case 'islamic-tbla': | ||
return new (0, $ecb2c4cc8c9aae25$exports.IslamicTabularCalendar)(); | ||
case "islamic-umalqura": | ||
case 'islamic-umalqura': | ||
return new (0, $ecb2c4cc8c9aae25$exports.IslamicUmalquraCalendar)(); | ||
case "japanese": | ||
case 'japanese': | ||
return new (0, $b0ac0602ef646b2c$exports.JapaneseCalendar)(); | ||
case "persian": | ||
case 'persian': | ||
return new (0, $3c060181fc7249ae$exports.PersianCalendar)(); | ||
case "roc": | ||
case 'roc': | ||
return new (0, $9cc5d3577ec40243$exports.TaiwanCalendar)(); | ||
case "gregory": | ||
case 'gregory': | ||
default: | ||
@@ -65,0 +65,0 @@ return new (0, $af14c9812fdceb33$exports.GregorianCalendar)(); |
@@ -32,27 +32,27 @@ import {BuddhistCalendar as $8d73d47422ca7302$export$42d20a78301dee44} from "./BuddhistCalendar.module.js"; | ||
switch(name){ | ||
case "buddhist": | ||
case 'buddhist': | ||
return new (0, $8d73d47422ca7302$export$42d20a78301dee44)(); | ||
case "ethiopic": | ||
case 'ethiopic': | ||
return new (0, $b956b2d7a6cf451f$export$26ba6eab5e20cd7d)(); | ||
case "ethioaa": | ||
case 'ethioaa': | ||
return new (0, $b956b2d7a6cf451f$export$d72e0c37005a4914)(); | ||
case "coptic": | ||
case 'coptic': | ||
return new (0, $b956b2d7a6cf451f$export$fe6243cbe1a4b7c1)(); | ||
case "hebrew": | ||
case 'hebrew': | ||
return new (0, $7c5f6fbf42389787$export$ca405048b8fb5af)(); | ||
case "indian": | ||
case 'indian': | ||
return new (0, $82c358003bdda0a8$export$39f31c639fa15726)(); | ||
case "islamic-civil": | ||
case 'islamic-civil': | ||
return new (0, $f2f3e0e3a817edbd$export$2066795aadd37bfc)(); | ||
case "islamic-tbla": | ||
case 'islamic-tbla': | ||
return new (0, $f2f3e0e3a817edbd$export$37f0887f2f9d22f7)(); | ||
case "islamic-umalqura": | ||
case 'islamic-umalqura': | ||
return new (0, $f2f3e0e3a817edbd$export$5baab4758c231076)(); | ||
case "japanese": | ||
case 'japanese': | ||
return new (0, $62225008020f0a13$export$b746ab2b60cdffbf)(); | ||
case "persian": | ||
case 'persian': | ||
return new (0, $f3ed2e4472ae7e25$export$37fccdbfd14c5939)(); | ||
case "roc": | ||
case 'roc': | ||
return new (0, $5f31bd6f0c8940b2$export$65e01080afcb0799)(); | ||
case "gregory": | ||
case 'gregory': | ||
default: | ||
@@ -59,0 +59,0 @@ return new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)(); |
@@ -27,5 +27,5 @@ | ||
// @ts-ignore | ||
if (typeof this.formatter.formatRange === "function") // @ts-ignore | ||
if (typeof this.formatter.formatRange === 'function') // @ts-ignore | ||
return this.formatter.formatRange(start, end); | ||
if (end < start) throw new RangeError("End date must be >= start date"); | ||
if (end < start) throw new RangeError('End date must be >= start date'); | ||
// Very basic fallback for old browsers. | ||
@@ -36,5 +36,5 @@ return `${this.formatter.format(start)} \u{2013} ${this.formatter.format(end)}`; | ||
// @ts-ignore | ||
if (typeof this.formatter.formatRangeToParts === "function") // @ts-ignore | ||
if (typeof this.formatter.formatRangeToParts === 'function') // @ts-ignore | ||
return this.formatter.formatRangeToParts(start, end); | ||
if (end < start) throw new RangeError("End date must be >= start date"); | ||
if (end < start) throw new RangeError('End date must be >= start date'); | ||
let startParts = this.formatter.formatToParts(start); | ||
@@ -45,12 +45,12 @@ let endParts = this.formatter.formatToParts(end); | ||
...p, | ||
source: "startRange" | ||
source: 'startRange' | ||
})), | ||
{ | ||
type: "literal", | ||
type: 'literal', | ||
value: " \u2013 ", | ||
source: "shared" | ||
source: 'shared' | ||
}, | ||
...endParts.map((p)=>({ | ||
...p, | ||
source: "endRange" | ||
source: 'endRange' | ||
})) | ||
@@ -64,7 +64,7 @@ ]; | ||
resolvedOptions.hourCycle = this.resolvedHourCycle; | ||
resolvedOptions.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12"; | ||
resolvedOptions.hour12 = this.resolvedHourCycle === 'h11' || this.resolvedHourCycle === 'h12'; | ||
} | ||
// Safari uses a different name for the Ethiopic (Amete Alem) calendar. | ||
// https://bugs.webkit.org/show_bug.cgi?id=241564 | ||
if (resolvedOptions.calendar === "ethiopic-amete-alem") resolvedOptions.calendar = "ethioaa"; | ||
if (resolvedOptions.calendar === 'ethiopic-amete-alem') resolvedOptions.calendar = 'ethioaa'; | ||
return resolvedOptions; | ||
@@ -90,3 +90,3 @@ } | ||
// Only Japanese uses the h11 style for 12 hour time. All others use h12. | ||
ja: "h11" | ||
ja: 'h11' | ||
}, | ||
@@ -99,12 +99,12 @@ false: { | ||
// Only apply the workaround if the issue is detected, because the hourCycle option is buggy in Safari. | ||
if (typeof options.hour12 === "boolean" && $8f23a04ae90a588b$var$hasBuggyHour12Behavior()) { | ||
if (typeof options.hour12 === 'boolean' && $8f23a04ae90a588b$var$hasBuggyHour12Behavior()) { | ||
options = { | ||
...options | ||
}; | ||
let pref = $8f23a04ae90a588b$var$hour12Preferences[String(options.hour12)][locale.split("-")[0]]; | ||
let defaultHourCycle = options.hour12 ? "h12" : "h23"; | ||
let pref = $8f23a04ae90a588b$var$hour12Preferences[String(options.hour12)][locale.split('-')[0]]; | ||
let defaultHourCycle = options.hour12 ? 'h12' : 'h23'; | ||
options.hourCycle = pref !== null && pref !== void 0 ? pref : defaultHourCycle; | ||
delete options.hour12; | ||
} | ||
let cacheKey = locale + (options ? Object.entries(options).sort((a, b)=>a[0] < b[0] ? -1 : 1).join() : ""); | ||
let cacheKey = locale + (options ? Object.entries(options).sort((a, b)=>a[0] < b[0] ? -1 : 1).join() : ''); | ||
if ($8f23a04ae90a588b$var$formatterCache.has(cacheKey)) return $8f23a04ae90a588b$var$formatterCache.get(cacheKey); | ||
@@ -117,6 +117,6 @@ let numberFormatter = new Intl.DateTimeFormat(locale, options); | ||
function $8f23a04ae90a588b$var$hasBuggyHour12Behavior() { | ||
if ($8f23a04ae90a588b$var$_hasBuggyHour12Behavior == null) $8f23a04ae90a588b$var$_hasBuggyHour12Behavior = new Intl.DateTimeFormat("en-US", { | ||
hour: "numeric", | ||
if ($8f23a04ae90a588b$var$_hasBuggyHour12Behavior == null) $8f23a04ae90a588b$var$_hasBuggyHour12Behavior = new Intl.DateTimeFormat('en-US', { | ||
hour: 'numeric', | ||
hour12: false | ||
}).format(new Date(2020, 2, 3, 0)) === "24"; | ||
}).format(new Date(2020, 2, 3, 0)) === '24'; | ||
return $8f23a04ae90a588b$var$_hasBuggyHour12Behavior; | ||
@@ -126,6 +126,6 @@ } | ||
function $8f23a04ae90a588b$var$hasBuggyResolvedHourCycle() { | ||
if ($8f23a04ae90a588b$var$_hasBuggyResolvedHourCycle == null) $8f23a04ae90a588b$var$_hasBuggyResolvedHourCycle = new Intl.DateTimeFormat("fr", { | ||
hour: "numeric", | ||
if ($8f23a04ae90a588b$var$_hasBuggyResolvedHourCycle == null) $8f23a04ae90a588b$var$_hasBuggyResolvedHourCycle = new Intl.DateTimeFormat('fr', { | ||
hour: 'numeric', | ||
hour12: false | ||
}).resolvedOptions().hourCycle === "h12"; | ||
}).resolvedOptions().hourCycle === 'h12'; | ||
return $8f23a04ae90a588b$var$_hasBuggyResolvedHourCycle; | ||
@@ -137,4 +137,4 @@ } | ||
// Format the minimum possible hour and maximum possible hour in a day and parse the results. | ||
locale = locale.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""); | ||
locale += (locale.includes("-u-") ? "" : "-u") + "-nu-latn"; | ||
locale = locale.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ''); | ||
locale += (locale.includes('-u-') ? '' : '-u') + '-nu-latn'; | ||
let formatter = $8f23a04ae90a588b$var$getCachedDateFormatter(locale, { | ||
@@ -144,9 +144,9 @@ ...options, | ||
}); | ||
let min = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 0)).find((p)=>p.type === "hour").value, 10); | ||
let max = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 23)).find((p)=>p.type === "hour").value, 10); | ||
if (min === 0 && max === 23) return "h23"; | ||
if (min === 24 && max === 23) return "h24"; | ||
if (min === 0 && max === 11) return "h11"; | ||
if (min === 12 && max === 11) return "h12"; | ||
throw new Error("Unexpected hour cycle result"); | ||
let min = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 0)).find((p)=>p.type === 'hour').value, 10); | ||
let max = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 23)).find((p)=>p.type === 'hour').value, 10); | ||
if (min === 0 && max === 23) return 'h23'; | ||
if (min === 24 && max === 23) return 'h24'; | ||
if (min === 0 && max === 11) return 'h11'; | ||
if (min === 12 && max === 11) return 'h12'; | ||
throw new Error('Unexpected hour cycle result'); | ||
} | ||
@@ -153,0 +153,0 @@ |
@@ -21,5 +21,5 @@ /* | ||
// @ts-ignore | ||
if (typeof this.formatter.formatRange === "function") // @ts-ignore | ||
if (typeof this.formatter.formatRange === 'function') // @ts-ignore | ||
return this.formatter.formatRange(start, end); | ||
if (end < start) throw new RangeError("End date must be >= start date"); | ||
if (end < start) throw new RangeError('End date must be >= start date'); | ||
// Very basic fallback for old browsers. | ||
@@ -30,5 +30,5 @@ return `${this.formatter.format(start)} \u{2013} ${this.formatter.format(end)}`; | ||
// @ts-ignore | ||
if (typeof this.formatter.formatRangeToParts === "function") // @ts-ignore | ||
if (typeof this.formatter.formatRangeToParts === 'function') // @ts-ignore | ||
return this.formatter.formatRangeToParts(start, end); | ||
if (end < start) throw new RangeError("End date must be >= start date"); | ||
if (end < start) throw new RangeError('End date must be >= start date'); | ||
let startParts = this.formatter.formatToParts(start); | ||
@@ -39,12 +39,12 @@ let endParts = this.formatter.formatToParts(end); | ||
...p, | ||
source: "startRange" | ||
source: 'startRange' | ||
})), | ||
{ | ||
type: "literal", | ||
type: 'literal', | ||
value: " \u2013 ", | ||
source: "shared" | ||
source: 'shared' | ||
}, | ||
...endParts.map((p)=>({ | ||
...p, | ||
source: "endRange" | ||
source: 'endRange' | ||
})) | ||
@@ -58,7 +58,7 @@ ]; | ||
resolvedOptions.hourCycle = this.resolvedHourCycle; | ||
resolvedOptions.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12"; | ||
resolvedOptions.hour12 = this.resolvedHourCycle === 'h11' || this.resolvedHourCycle === 'h12'; | ||
} | ||
// Safari uses a different name for the Ethiopic (Amete Alem) calendar. | ||
// https://bugs.webkit.org/show_bug.cgi?id=241564 | ||
if (resolvedOptions.calendar === "ethiopic-amete-alem") resolvedOptions.calendar = "ethioaa"; | ||
if (resolvedOptions.calendar === 'ethiopic-amete-alem') resolvedOptions.calendar = 'ethioaa'; | ||
return resolvedOptions; | ||
@@ -84,3 +84,3 @@ } | ||
// Only Japanese uses the h11 style for 12 hour time. All others use h12. | ||
ja: "h11" | ||
ja: 'h11' | ||
}, | ||
@@ -93,12 +93,12 @@ false: { | ||
// Only apply the workaround if the issue is detected, because the hourCycle option is buggy in Safari. | ||
if (typeof options.hour12 === "boolean" && $fb18d541ea1ad717$var$hasBuggyHour12Behavior()) { | ||
if (typeof options.hour12 === 'boolean' && $fb18d541ea1ad717$var$hasBuggyHour12Behavior()) { | ||
options = { | ||
...options | ||
}; | ||
let pref = $fb18d541ea1ad717$var$hour12Preferences[String(options.hour12)][locale.split("-")[0]]; | ||
let defaultHourCycle = options.hour12 ? "h12" : "h23"; | ||
let pref = $fb18d541ea1ad717$var$hour12Preferences[String(options.hour12)][locale.split('-')[0]]; | ||
let defaultHourCycle = options.hour12 ? 'h12' : 'h23'; | ||
options.hourCycle = pref !== null && pref !== void 0 ? pref : defaultHourCycle; | ||
delete options.hour12; | ||
} | ||
let cacheKey = locale + (options ? Object.entries(options).sort((a, b)=>a[0] < b[0] ? -1 : 1).join() : ""); | ||
let cacheKey = locale + (options ? Object.entries(options).sort((a, b)=>a[0] < b[0] ? -1 : 1).join() : ''); | ||
if ($fb18d541ea1ad717$var$formatterCache.has(cacheKey)) return $fb18d541ea1ad717$var$formatterCache.get(cacheKey); | ||
@@ -111,6 +111,6 @@ let numberFormatter = new Intl.DateTimeFormat(locale, options); | ||
function $fb18d541ea1ad717$var$hasBuggyHour12Behavior() { | ||
if ($fb18d541ea1ad717$var$_hasBuggyHour12Behavior == null) $fb18d541ea1ad717$var$_hasBuggyHour12Behavior = new Intl.DateTimeFormat("en-US", { | ||
hour: "numeric", | ||
if ($fb18d541ea1ad717$var$_hasBuggyHour12Behavior == null) $fb18d541ea1ad717$var$_hasBuggyHour12Behavior = new Intl.DateTimeFormat('en-US', { | ||
hour: 'numeric', | ||
hour12: false | ||
}).format(new Date(2020, 2, 3, 0)) === "24"; | ||
}).format(new Date(2020, 2, 3, 0)) === '24'; | ||
return $fb18d541ea1ad717$var$_hasBuggyHour12Behavior; | ||
@@ -120,6 +120,6 @@ } | ||
function $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle() { | ||
if ($fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle == null) $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle = new Intl.DateTimeFormat("fr", { | ||
hour: "numeric", | ||
if ($fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle == null) $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle = new Intl.DateTimeFormat('fr', { | ||
hour: 'numeric', | ||
hour12: false | ||
}).resolvedOptions().hourCycle === "h12"; | ||
}).resolvedOptions().hourCycle === 'h12'; | ||
return $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle; | ||
@@ -131,4 +131,4 @@ } | ||
// Format the minimum possible hour and maximum possible hour in a day and parse the results. | ||
locale = locale.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""); | ||
locale += (locale.includes("-u-") ? "" : "-u") + "-nu-latn"; | ||
locale = locale.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ''); | ||
locale += (locale.includes('-u-') ? '' : '-u') + '-nu-latn'; | ||
let formatter = $fb18d541ea1ad717$var$getCachedDateFormatter(locale, { | ||
@@ -138,9 +138,9 @@ ...options, | ||
}); | ||
let min = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 0)).find((p)=>p.type === "hour").value, 10); | ||
let max = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 23)).find((p)=>p.type === "hour").value, 10); | ||
if (min === 0 && max === 23) return "h23"; | ||
if (min === 24 && max === 23) return "h24"; | ||
if (min === 0 && max === 11) return "h11"; | ||
if (min === 12 && max === 11) return "h12"; | ||
throw new Error("Unexpected hour cycle result"); | ||
let min = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 0)).find((p)=>p.type === 'hour').value, 10); | ||
let max = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 23)).find((p)=>p.type === 'hour').value, 10); | ||
if (min === 0 && max === 23) return 'h23'; | ||
if (min === 24 && max === 23) return 'h24'; | ||
if (min === 0 && max === 11) return 'h11'; | ||
if (min === 12 && max === 11) return 'h12'; | ||
throw new Error('Unexpected hour cycle result'); | ||
} | ||
@@ -147,0 +147,0 @@ |
@@ -64,5 +64,5 @@ var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js"); | ||
let [year, month, day] = $4db04d1051af0f2f$var$julianDayToCE($4db04d1051af0f2f$var$ETHIOPIC_EPOCH, jd); | ||
let era = "AM"; | ||
let era = 'AM'; | ||
if (year <= 0) { | ||
era = "AA"; | ||
era = 'AA'; | ||
year += $4db04d1051af0f2f$var$AMETE_MIHRET_DELTA; | ||
@@ -74,3 +74,3 @@ } | ||
let year = date.year; | ||
if (date.era === "AA") year -= $4db04d1051af0f2f$var$AMETE_MIHRET_DELTA; | ||
if (date.era === 'AA') year -= $4db04d1051af0f2f$var$AMETE_MIHRET_DELTA; | ||
return $4db04d1051af0f2f$var$ceToJulianDay($4db04d1051af0f2f$var$ETHIOPIC_EPOCH, year, date.month, date.day); | ||
@@ -91,12 +91,12 @@ } | ||
// AA 9999-01-01 ethiopic is 4506-09-30 gregorian. | ||
return date.era === "AA" ? 9999 : 9991; | ||
return date.era === 'AA' ? 9999 : 9991; | ||
} | ||
getEras() { | ||
return [ | ||
"AA", | ||
"AM" | ||
'AA', | ||
'AM' | ||
]; | ||
} | ||
constructor(){ | ||
this.identifier = "ethiopic"; | ||
this.identifier = 'ethiopic'; | ||
} | ||
@@ -108,7 +108,7 @@ } | ||
year += $4db04d1051af0f2f$var$AMETE_MIHRET_DELTA; | ||
return new (0, $625ad1e1f4c43bc1$exports.CalendarDate)(this, "AA", year, month, day); | ||
return new (0, $625ad1e1f4c43bc1$exports.CalendarDate)(this, 'AA', year, month, day); | ||
} | ||
getEras() { | ||
return [ | ||
"AA" | ||
'AA' | ||
]; | ||
@@ -122,3 +122,3 @@ } | ||
super(...args); | ||
this.identifier = "ethioaa" // also known as 'ethiopic-amete-alem' in ICU | ||
this.identifier = 'ethioaa' // also known as 'ethiopic-amete-alem' in ICU | ||
; | ||
@@ -130,5 +130,5 @@ } | ||
let [year, month, day] = $4db04d1051af0f2f$var$julianDayToCE($4db04d1051af0f2f$var$COPTIC_EPOCH, jd); | ||
let era = "CE"; | ||
let era = 'CE'; | ||
if (year <= 0) { | ||
era = "BCE"; | ||
era = 'BCE'; | ||
year = 1 - year; | ||
@@ -140,3 +140,3 @@ } | ||
let year = date.year; | ||
if (date.era === "BCE") year = 1 - year; | ||
if (date.era === 'BCE') year = 1 - year; | ||
return $4db04d1051af0f2f$var$ceToJulianDay($4db04d1051af0f2f$var$COPTIC_EPOCH, year, date.month, date.day); | ||
@@ -146,11 +146,11 @@ } | ||
let year = date.year; | ||
if (date.era === "BCE") year = 1 - year; | ||
if (date.era === 'BCE') year = 1 - year; | ||
return $4db04d1051af0f2f$var$getDaysInMonth(year, date.month); | ||
} | ||
isInverseEra(date) { | ||
return date.era === "BCE"; | ||
return date.era === 'BCE'; | ||
} | ||
balanceDate(date) { | ||
if (date.year <= 0) { | ||
date.era = date.era === "BCE" ? "CE" : "BCE"; | ||
date.era = date.era === 'BCE' ? 'CE' : 'BCE'; | ||
date.year = 1 - date.year; | ||
@@ -161,4 +161,4 @@ } | ||
return [ | ||
"BCE", | ||
"CE" | ||
'BCE', | ||
'CE' | ||
]; | ||
@@ -170,7 +170,7 @@ } | ||
// BCE 9999-01-01 coptic is BC 9716-06-15 gregorian. | ||
return date.era === "BCE" ? 9999 : 9715; | ||
return date.era === 'BCE' ? 9999 : 9715; | ||
} | ||
constructor(...args){ | ||
super(...args); | ||
this.identifier = "coptic"; | ||
this.identifier = 'coptic'; | ||
} | ||
@@ -177,0 +177,0 @@ } |
@@ -56,5 +56,5 @@ import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f} from "./CalendarDate.module.js"; | ||
let [year, month, day] = $b956b2d7a6cf451f$var$julianDayToCE($b956b2d7a6cf451f$var$ETHIOPIC_EPOCH, jd); | ||
let era = "AM"; | ||
let era = 'AM'; | ||
if (year <= 0) { | ||
era = "AA"; | ||
era = 'AA'; | ||
year += $b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA; | ||
@@ -66,3 +66,3 @@ } | ||
let year = date.year; | ||
if (date.era === "AA") year -= $b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA; | ||
if (date.era === 'AA') year -= $b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA; | ||
return $b956b2d7a6cf451f$var$ceToJulianDay($b956b2d7a6cf451f$var$ETHIOPIC_EPOCH, year, date.month, date.day); | ||
@@ -83,12 +83,12 @@ } | ||
// AA 9999-01-01 ethiopic is 4506-09-30 gregorian. | ||
return date.era === "AA" ? 9999 : 9991; | ||
return date.era === 'AA' ? 9999 : 9991; | ||
} | ||
getEras() { | ||
return [ | ||
"AA", | ||
"AM" | ||
'AA', | ||
'AM' | ||
]; | ||
} | ||
constructor(){ | ||
this.identifier = "ethiopic"; | ||
this.identifier = 'ethiopic'; | ||
} | ||
@@ -100,7 +100,7 @@ } | ||
year += $b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA; | ||
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(this, "AA", year, month, day); | ||
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(this, 'AA', year, month, day); | ||
} | ||
getEras() { | ||
return [ | ||
"AA" | ||
'AA' | ||
]; | ||
@@ -114,3 +114,3 @@ } | ||
super(...args); | ||
this.identifier = "ethioaa" // also known as 'ethiopic-amete-alem' in ICU | ||
this.identifier = 'ethioaa' // also known as 'ethiopic-amete-alem' in ICU | ||
; | ||
@@ -122,5 +122,5 @@ } | ||
let [year, month, day] = $b956b2d7a6cf451f$var$julianDayToCE($b956b2d7a6cf451f$var$COPTIC_EPOCH, jd); | ||
let era = "CE"; | ||
let era = 'CE'; | ||
if (year <= 0) { | ||
era = "BCE"; | ||
era = 'BCE'; | ||
year = 1 - year; | ||
@@ -132,3 +132,3 @@ } | ||
let year = date.year; | ||
if (date.era === "BCE") year = 1 - year; | ||
if (date.era === 'BCE') year = 1 - year; | ||
return $b956b2d7a6cf451f$var$ceToJulianDay($b956b2d7a6cf451f$var$COPTIC_EPOCH, year, date.month, date.day); | ||
@@ -138,11 +138,11 @@ } | ||
let year = date.year; | ||
if (date.era === "BCE") year = 1 - year; | ||
if (date.era === 'BCE') year = 1 - year; | ||
return $b956b2d7a6cf451f$var$getDaysInMonth(year, date.month); | ||
} | ||
isInverseEra(date) { | ||
return date.era === "BCE"; | ||
return date.era === 'BCE'; | ||
} | ||
balanceDate(date) { | ||
if (date.year <= 0) { | ||
date.era = date.era === "BCE" ? "CE" : "BCE"; | ||
date.era = date.era === 'BCE' ? 'CE' : 'BCE'; | ||
date.year = 1 - date.year; | ||
@@ -153,4 +153,4 @@ } | ||
return [ | ||
"BCE", | ||
"CE" | ||
'BCE', | ||
'CE' | ||
]; | ||
@@ -162,7 +162,7 @@ } | ||
// BCE 9999-01-01 coptic is BC 9716-06-15 gregorian. | ||
return date.era === "BCE" ? 9999 : 9715; | ||
return date.era === 'BCE' ? 9999 : 9715; | ||
} | ||
constructor(...args){ | ||
super(...args); | ||
this.identifier = "coptic"; | ||
this.identifier = 'coptic'; | ||
} | ||
@@ -169,0 +169,0 @@ } |
@@ -41,8 +41,8 @@ var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js"); | ||
function $af14c9812fdceb33$export$c36e0ecb2d4fa69d(era, year) { | ||
return era === "BC" ? 1 - year : year; | ||
return era === 'BC' ? 1 - year : year; | ||
} | ||
function $af14c9812fdceb33$export$4475b7e617eb123c(year) { | ||
let era = "AD"; | ||
let era = 'AD'; | ||
if (year <= 0) { | ||
era = "BC"; | ||
era = 'BC'; | ||
year = 1 - year; | ||
@@ -110,3 +110,3 @@ } | ||
getDaysInMonth(date) { | ||
return $af14c9812fdceb33$var$daysInMonth[$af14c9812fdceb33$export$553d7fa8e3805fc0(date.year) ? "leapyear" : "standard"][date.month - 1]; | ||
return $af14c9812fdceb33$var$daysInMonth[$af14c9812fdceb33$export$553d7fa8e3805fc0(date.year) ? 'leapyear' : 'standard'][date.month - 1]; | ||
} | ||
@@ -126,12 +126,12 @@ // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
return [ | ||
"BC", | ||
"AD" | ||
'BC', | ||
'AD' | ||
]; | ||
} | ||
isInverseEra(date) { | ||
return date.era === "BC"; | ||
return date.era === 'BC'; | ||
} | ||
balanceDate(date) { | ||
if (date.year <= 0) { | ||
date.era = date.era === "BC" ? "AD" : "BC"; | ||
date.era = date.era === 'BC' ? 'AD' : 'BC'; | ||
date.year = 1 - date.year; | ||
@@ -141,3 +141,3 @@ } | ||
constructor(){ | ||
this.identifier = "gregory"; | ||
this.identifier = 'gregory'; | ||
} | ||
@@ -144,0 +144,0 @@ } |
@@ -31,8 +31,8 @@ import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f} from "./CalendarDate.module.js"; | ||
function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year) { | ||
return era === "BC" ? 1 - year : year; | ||
return era === 'BC' ? 1 - year : year; | ||
} | ||
function $3b62074eb05584b2$export$4475b7e617eb123c(year) { | ||
let era = "AD"; | ||
let era = 'AD'; | ||
if (year <= 0) { | ||
era = "BC"; | ||
era = 'BC'; | ||
year = 1 - year; | ||
@@ -100,3 +100,3 @@ } | ||
getDaysInMonth(date) { | ||
return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? "leapyear" : "standard"][date.month - 1]; | ||
return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 'leapyear' : 'standard'][date.month - 1]; | ||
} | ||
@@ -116,12 +116,12 @@ // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
return [ | ||
"BC", | ||
"AD" | ||
'BC', | ||
'AD' | ||
]; | ||
} | ||
isInverseEra(date) { | ||
return date.era === "BC"; | ||
return date.era === 'BC'; | ||
} | ||
balanceDate(date) { | ||
if (date.year <= 0) { | ||
date.era = date.era === "BC" ? "AD" : "BC"; | ||
date.era = date.era === 'BC' ? 'AD' : 'BC'; | ||
date.year = 1 - date.year; | ||
@@ -131,3 +131,3 @@ } | ||
constructor(){ | ||
this.identifier = "gregory"; | ||
this.identifier = 'gregory'; | ||
} | ||
@@ -134,0 +134,0 @@ } |
@@ -133,3 +133,3 @@ var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js"); | ||
return [ | ||
"AM" | ||
'AM' | ||
]; | ||
@@ -145,3 +145,3 @@ } | ||
constructor(){ | ||
this.identifier = "hebrew"; | ||
this.identifier = 'hebrew'; | ||
} | ||
@@ -148,0 +148,0 @@ } |
@@ -127,3 +127,3 @@ import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f} from "./CalendarDate.module.js"; | ||
return [ | ||
"AM" | ||
'AM' | ||
]; | ||
@@ -139,3 +139,3 @@ } | ||
constructor(){ | ||
this.identifier = "hebrew"; | ||
this.identifier = 'hebrew'; | ||
} | ||
@@ -142,0 +142,0 @@ } |
@@ -96,3 +96,3 @@ var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js"); | ||
return [ | ||
"saka" | ||
'saka' | ||
]; | ||
@@ -103,3 +103,3 @@ } | ||
super(...args); | ||
this.identifier = "indian"; | ||
this.identifier = 'indian'; | ||
} | ||
@@ -106,0 +106,0 @@ } |
@@ -90,3 +90,3 @@ import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f} from "./CalendarDate.module.js"; | ||
return [ | ||
"saka" | ||
'saka' | ||
]; | ||
@@ -97,3 +97,3 @@ } | ||
super(...args); | ||
this.identifier = "indian"; | ||
this.identifier = 'indian'; | ||
} | ||
@@ -100,0 +100,0 @@ } |
@@ -65,7 +65,7 @@ var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js"); | ||
return [ | ||
"AH" | ||
'AH' | ||
]; | ||
} | ||
constructor(){ | ||
this.identifier = "islamic-civil"; | ||
this.identifier = 'islamic-civil'; | ||
} | ||
@@ -82,7 +82,7 @@ } | ||
super(...args); | ||
this.identifier = "islamic-tbla"; | ||
this.identifier = 'islamic-tbla'; | ||
} | ||
} | ||
// Generated by scripts/generate-umalqura.js | ||
const $ecb2c4cc8c9aae25$var$UMALQURA_DATA = "qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="; | ||
const $ecb2c4cc8c9aae25$var$UMALQURA_DATA = 'qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI='; | ||
let $ecb2c4cc8c9aae25$var$UMALQURA_MONTHLENGTH; | ||
@@ -152,3 +152,3 @@ let $ecb2c4cc8c9aae25$var$UMALQURA_YEAR_START_TABLE; | ||
super(); | ||
this.identifier = "islamic-umalqura"; | ||
this.identifier = 'islamic-umalqura'; | ||
if (!$ecb2c4cc8c9aae25$var$UMALQURA_MONTHLENGTH) $ecb2c4cc8c9aae25$var$UMALQURA_MONTHLENGTH = new Uint16Array(Uint8Array.from(atob($ecb2c4cc8c9aae25$var$UMALQURA_DATA), (c)=>c.charCodeAt(0)).buffer); | ||
@@ -155,0 +155,0 @@ if (!$ecb2c4cc8c9aae25$var$UMALQURA_YEAR_START_TABLE) { |
@@ -57,7 +57,7 @@ import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f} from "./CalendarDate.module.js"; | ||
return [ | ||
"AH" | ||
'AH' | ||
]; | ||
} | ||
constructor(){ | ||
this.identifier = "islamic-civil"; | ||
this.identifier = 'islamic-civil'; | ||
} | ||
@@ -74,7 +74,7 @@ } | ||
super(...args); | ||
this.identifier = "islamic-tbla"; | ||
this.identifier = 'islamic-tbla'; | ||
} | ||
} | ||
// Generated by scripts/generate-umalqura.js | ||
const $f2f3e0e3a817edbd$var$UMALQURA_DATA = "qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="; | ||
const $f2f3e0e3a817edbd$var$UMALQURA_DATA = 'qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI='; | ||
let $f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH; | ||
@@ -144,3 +144,3 @@ let $f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE; | ||
super(); | ||
this.identifier = "islamic-umalqura"; | ||
this.identifier = 'islamic-umalqura'; | ||
if (!$f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH) $f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH = new Uint16Array(Uint8Array.from(atob($f2f3e0e3a817edbd$var$UMALQURA_DATA), (c)=>c.charCodeAt(0)).buffer); | ||
@@ -147,0 +147,0 @@ if (!$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE) { |
@@ -81,7 +81,7 @@ var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js"); | ||
const $b0ac0602ef646b2c$var$ERA_NAMES = [ | ||
"meiji", | ||
"taisho", | ||
"showa", | ||
"heisei", | ||
"reiwa" | ||
'meiji', | ||
'taisho', | ||
'showa', | ||
'heisei', | ||
'reiwa' | ||
]; | ||
@@ -101,3 +101,3 @@ function $b0ac0602ef646b2c$var$findEraFromGregorianDate(date) { | ||
let eraAddend = $b0ac0602ef646b2c$var$ERA_ADDENDS[$b0ac0602ef646b2c$var$ERA_NAMES.indexOf(date.era)]; | ||
if (!eraAddend) throw new Error("Unknown era: " + date.era); | ||
if (!eraAddend) throw new Error('Unknown era: ' + date.era); | ||
return new (0, $625ad1e1f4c43bc1$exports.CalendarDate)(date.year + eraAddend, date.month, date.day); | ||
@@ -171,3 +171,3 @@ } | ||
super(...args); | ||
this.identifier = "japanese"; | ||
this.identifier = 'japanese'; | ||
} | ||
@@ -174,0 +174,0 @@ } |
@@ -75,7 +75,7 @@ import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f} from "./CalendarDate.module.js"; | ||
const $62225008020f0a13$var$ERA_NAMES = [ | ||
"meiji", | ||
"taisho", | ||
"showa", | ||
"heisei", | ||
"reiwa" | ||
'meiji', | ||
'taisho', | ||
'showa', | ||
'heisei', | ||
'reiwa' | ||
]; | ||
@@ -95,3 +95,3 @@ function $62225008020f0a13$var$findEraFromGregorianDate(date) { | ||
let eraAddend = $62225008020f0a13$var$ERA_ADDENDS[$62225008020f0a13$var$ERA_NAMES.indexOf(date.era)]; | ||
if (!eraAddend) throw new Error("Unknown era: " + date.era); | ||
if (!eraAddend) throw new Error('Unknown era: ' + date.era); | ||
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(date.year + eraAddend, date.month, date.day); | ||
@@ -165,3 +165,3 @@ } | ||
super(...args); | ||
this.identifier = "japanese"; | ||
this.identifier = 'japanese'; | ||
} | ||
@@ -168,0 +168,0 @@ } |
@@ -38,3 +38,3 @@ var $4ae0260a69729f1d$exports = require("./conversion.main.js"); | ||
let mutableDate = date.copy(); | ||
let days = "hour" in mutableDate ? $5c0571aa5b6fb5da$var$addTimeFields(mutableDate, duration) : 0; | ||
let days = 'hour' in mutableDate ? $5c0571aa5b6fb5da$var$addTimeFields(mutableDate, duration) : 0; | ||
$5c0571aa5b6fb5da$var$addYears(mutableDate, duration.years || 0); | ||
@@ -118,3 +118,3 @@ if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date); | ||
let inverseDuration = {}; | ||
for(let key in duration)if (typeof duration[key] === "number") inverseDuration[key] = -duration[key]; | ||
for(let key in duration)if (typeof duration[key] === 'number') inverseDuration[key] = -duration[key]; | ||
return inverseDuration; | ||
@@ -183,7 +183,7 @@ } | ||
switch(field){ | ||
case "era": | ||
case 'era': | ||
{ | ||
let eras = value.calendar.getEras(); | ||
let eraIndex = eras.indexOf(value.era); | ||
if (eraIndex < 0) throw new Error("Invalid era: " + value.era); | ||
if (eraIndex < 0) throw new Error('Invalid era: ' + value.era); | ||
eraIndex = $5c0571aa5b6fb5da$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options === null || options === void 0 ? void 0 : options.round); | ||
@@ -195,3 +195,3 @@ mutable.era = eras[eraIndex]; | ||
} | ||
case "year": | ||
case 'year': | ||
var _mutable_calendar_isInverseEra, _mutable_calendar; | ||
@@ -206,10 +206,10 @@ if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable)) amount = -amount; | ||
break; | ||
case "month": | ||
case 'month': | ||
mutable.month = $5c0571aa5b6fb5da$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options === null || options === void 0 ? void 0 : options.round); | ||
break; | ||
case "day": | ||
case 'day': | ||
mutable.day = $5c0571aa5b6fb5da$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options === null || options === void 0 ? void 0 : options.round); | ||
break; | ||
default: | ||
throw new Error("Unsupported field " + field); | ||
throw new Error('Unsupported field ' + field); | ||
} | ||
@@ -223,3 +223,3 @@ if (value.calendar.balanceDate) value.calendar.balanceDate(mutable); | ||
switch(field){ | ||
case "hour": | ||
case 'hour': | ||
{ | ||
@@ -237,13 +237,13 @@ let hours = value.hour; | ||
} | ||
case "minute": | ||
case 'minute': | ||
mutable.minute = $5c0571aa5b6fb5da$var$cycleValue(value.minute, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round); | ||
break; | ||
case "second": | ||
case 'second': | ||
mutable.second = $5c0571aa5b6fb5da$var$cycleValue(value.second, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round); | ||
break; | ||
case "millisecond": | ||
case 'millisecond': | ||
mutable.millisecond = $5c0571aa5b6fb5da$var$cycleValue(value.millisecond, amount, 0, 999, options === null || options === void 0 ? void 0 : options.round); | ||
break; | ||
default: | ||
throw new Error("Unsupported field " + field); | ||
throw new Error('Unsupported field ' + field); | ||
} | ||
@@ -299,3 +299,3 @@ return mutable; | ||
switch(field){ | ||
case "hour": | ||
case 'hour': | ||
{ | ||
@@ -319,4 +319,4 @@ let min = 0; | ||
let minAbsolute = [ | ||
(0, $4ae0260a69729f1d$exports.toAbsolute)(minDate, dateTime.timeZone, "earlier"), | ||
(0, $4ae0260a69729f1d$exports.toAbsolute)(minDate, dateTime.timeZone, "later") | ||
(0, $4ae0260a69729f1d$exports.toAbsolute)(minDate, dateTime.timeZone, 'earlier'), | ||
(0, $4ae0260a69729f1d$exports.toAbsolute)(minDate, dateTime.timeZone, 'later') | ||
].filter((ms)=>(0, $4ae0260a69729f1d$exports.fromAbsolute)(ms, dateTime.timeZone).day === minDate.day)[0]; | ||
@@ -327,4 +327,4 @@ let maxDate = (0, $4ae0260a69729f1d$exports.toCalendar)($5c0571aa5b6fb5da$export$e5d5e1c1822b6e56(plainDateTime, { | ||
let maxAbsolute = [ | ||
(0, $4ae0260a69729f1d$exports.toAbsolute)(maxDate, dateTime.timeZone, "earlier"), | ||
(0, $4ae0260a69729f1d$exports.toAbsolute)(maxDate, dateTime.timeZone, "later") | ||
(0, $4ae0260a69729f1d$exports.toAbsolute)(maxDate, dateTime.timeZone, 'earlier'), | ||
(0, $4ae0260a69729f1d$exports.toAbsolute)(maxDate, dateTime.timeZone, 'later') | ||
].filter((ms)=>(0, $4ae0260a69729f1d$exports.fromAbsolute)(ms, dateTime.timeZone).day === maxDate.day).pop(); | ||
@@ -341,11 +341,11 @@ // Since hours may repeat, we need to operate on the absolute time in milliseconds. | ||
} | ||
case "minute": | ||
case "second": | ||
case "millisecond": | ||
case 'minute': | ||
case 'second': | ||
case 'millisecond': | ||
// @ts-ignore | ||
return $5c0571aa5b6fb5da$export$dd02b3e0007dfe28(dateTime, field, amount, options); | ||
case "era": | ||
case "year": | ||
case "month": | ||
case "day": | ||
case 'era': | ||
case 'year': | ||
case 'month': | ||
case 'day': | ||
{ | ||
@@ -357,3 +357,3 @@ let res = $5c0571aa5b6fb5da$export$d52ced6badfb9a4c((0, $4ae0260a69729f1d$exports.toCalendarDateTime)(dateTime), field, amount, options); | ||
default: | ||
throw new Error("Unsupported field " + field); | ||
throw new Error('Unsupported field ' + field); | ||
} | ||
@@ -360,0 +360,0 @@ } |
@@ -19,3 +19,3 @@ import {epochFromDate as $11d87f3f76e88657$export$bd4fb2bc8bb06fb, fromAbsolute as $11d87f3f76e88657$export$1b96692a1ba042ac, toAbsolute as $11d87f3f76e88657$export$5107c82f94518f5c, toCalendar as $11d87f3f76e88657$export$b4a036af3fc0b032, toCalendarDateTime as $11d87f3f76e88657$export$b21e0b124e224484} from "./conversion.module.js"; | ||
let mutableDate = date.copy(); | ||
let days = "hour" in mutableDate ? $735220c2d4774dd3$var$addTimeFields(mutableDate, duration) : 0; | ||
let days = 'hour' in mutableDate ? $735220c2d4774dd3$var$addTimeFields(mutableDate, duration) : 0; | ||
$735220c2d4774dd3$var$addYears(mutableDate, duration.years || 0); | ||
@@ -99,3 +99,3 @@ if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date); | ||
let inverseDuration = {}; | ||
for(let key in duration)if (typeof duration[key] === "number") inverseDuration[key] = -duration[key]; | ||
for(let key in duration)if (typeof duration[key] === 'number') inverseDuration[key] = -duration[key]; | ||
return inverseDuration; | ||
@@ -164,7 +164,7 @@ } | ||
switch(field){ | ||
case "era": | ||
case 'era': | ||
{ | ||
let eras = value.calendar.getEras(); | ||
let eraIndex = eras.indexOf(value.era); | ||
if (eraIndex < 0) throw new Error("Invalid era: " + value.era); | ||
if (eraIndex < 0) throw new Error('Invalid era: ' + value.era); | ||
eraIndex = $735220c2d4774dd3$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options === null || options === void 0 ? void 0 : options.round); | ||
@@ -176,3 +176,3 @@ mutable.era = eras[eraIndex]; | ||
} | ||
case "year": | ||
case 'year': | ||
var _mutable_calendar_isInverseEra, _mutable_calendar; | ||
@@ -187,10 +187,10 @@ if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable)) amount = -amount; | ||
break; | ||
case "month": | ||
case 'month': | ||
mutable.month = $735220c2d4774dd3$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options === null || options === void 0 ? void 0 : options.round); | ||
break; | ||
case "day": | ||
case 'day': | ||
mutable.day = $735220c2d4774dd3$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options === null || options === void 0 ? void 0 : options.round); | ||
break; | ||
default: | ||
throw new Error("Unsupported field " + field); | ||
throw new Error('Unsupported field ' + field); | ||
} | ||
@@ -204,3 +204,3 @@ if (value.calendar.balanceDate) value.calendar.balanceDate(mutable); | ||
switch(field){ | ||
case "hour": | ||
case 'hour': | ||
{ | ||
@@ -218,13 +218,13 @@ let hours = value.hour; | ||
} | ||
case "minute": | ||
case 'minute': | ||
mutable.minute = $735220c2d4774dd3$var$cycleValue(value.minute, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round); | ||
break; | ||
case "second": | ||
case 'second': | ||
mutable.second = $735220c2d4774dd3$var$cycleValue(value.second, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round); | ||
break; | ||
case "millisecond": | ||
case 'millisecond': | ||
mutable.millisecond = $735220c2d4774dd3$var$cycleValue(value.millisecond, amount, 0, 999, options === null || options === void 0 ? void 0 : options.round); | ||
break; | ||
default: | ||
throw new Error("Unsupported field " + field); | ||
throw new Error('Unsupported field ' + field); | ||
} | ||
@@ -280,3 +280,3 @@ return mutable; | ||
switch(field){ | ||
case "hour": | ||
case 'hour': | ||
{ | ||
@@ -300,4 +300,4 @@ let min = 0; | ||
let minAbsolute = [ | ||
(0, $11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, "earlier"), | ||
(0, $11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, "later") | ||
(0, $11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, 'earlier'), | ||
(0, $11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, 'later') | ||
].filter((ms)=>(0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone).day === minDate.day)[0]; | ||
@@ -308,4 +308,4 @@ let maxDate = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, { | ||
let maxAbsolute = [ | ||
(0, $11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, "earlier"), | ||
(0, $11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, "later") | ||
(0, $11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, 'earlier'), | ||
(0, $11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, 'later') | ||
].filter((ms)=>(0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone).day === maxDate.day).pop(); | ||
@@ -322,11 +322,11 @@ // Since hours may repeat, we need to operate on the absolute time in milliseconds. | ||
} | ||
case "minute": | ||
case "second": | ||
case "millisecond": | ||
case 'minute': | ||
case 'second': | ||
case 'millisecond': | ||
// @ts-ignore | ||
return $735220c2d4774dd3$export$dd02b3e0007dfe28(dateTime, field, amount, options); | ||
case "era": | ||
case "year": | ||
case "month": | ||
case "day": | ||
case 'era': | ||
case 'year': | ||
case 'month': | ||
case 'day': | ||
{ | ||
@@ -338,3 +338,3 @@ let res = $735220c2d4774dd3$export$d52ced6badfb9a4c((0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime), field, amount, options); | ||
default: | ||
throw new Error("Unsupported field " + field); | ||
throw new Error('Unsupported field ' + field); | ||
} | ||
@@ -341,0 +341,0 @@ } |
@@ -67,3 +67,3 @@ var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js"); | ||
return [ | ||
"AP" | ||
'AP' | ||
]; | ||
@@ -77,3 +77,3 @@ } | ||
constructor(){ | ||
this.identifier = "persian"; | ||
this.identifier = 'persian'; | ||
} | ||
@@ -80,0 +80,0 @@ } |
@@ -61,3 +61,3 @@ import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f} from "./CalendarDate.module.js"; | ||
return [ | ||
"AP" | ||
'AP' | ||
]; | ||
@@ -71,3 +71,3 @@ } | ||
constructor(){ | ||
this.identifier = "persian"; | ||
this.identifier = 'persian'; | ||
} | ||
@@ -74,0 +74,0 @@ } |
@@ -176,4 +176,4 @@ var $4ae0260a69729f1d$exports = require("./conversion.main.js"); | ||
// Otherwise, it should be the region. | ||
let part = locale.split("-")[1]; | ||
return part === "u" ? undefined : part; | ||
let part = locale.split('-')[1]; | ||
return part === 'u' ? undefined : part; | ||
} | ||
@@ -180,0 +180,0 @@ function $1f0f7ebf1ae6c530$var$getWeekStart(locale) { |
@@ -144,4 +144,4 @@ import {fromAbsolute as $11d87f3f76e88657$export$1b96692a1ba042ac, toAbsolute as $11d87f3f76e88657$export$5107c82f94518f5c, toCalendar as $11d87f3f76e88657$export$b4a036af3fc0b032, toCalendarDate as $11d87f3f76e88657$export$93522d1a439f3617} from "./conversion.module.js"; | ||
// Otherwise, it should be the region. | ||
let part = locale.split("-")[1]; | ||
return part === "u" ? undefined : part; | ||
let part = locale.split('-')[1]; | ||
return part === 'u' ? undefined : part; | ||
} | ||
@@ -148,0 +148,0 @@ function $14e0f24ef4ac5c92$var$getWeekStart(locale) { |
@@ -43,11 +43,11 @@ var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js"); | ||
const $4c32e2d98e5a5134$var$requiredDurationTimeGroups = [ | ||
"hours", | ||
"minutes", | ||
"seconds" | ||
'hours', | ||
'minutes', | ||
'seconds' | ||
]; | ||
const $4c32e2d98e5a5134$var$requiredDurationGroups = [ | ||
"years", | ||
"months", | ||
"weeks", | ||
"days", | ||
'years', | ||
'months', | ||
'weeks', | ||
'days', | ||
...$4c32e2d98e5a5134$var$requiredDurationTimeGroups | ||
@@ -57,3 +57,3 @@ ]; | ||
let m = value.match($4c32e2d98e5a5134$var$TIME_RE); | ||
if (!m) throw new Error("Invalid ISO 8601 time string: " + value); | ||
if (!m) throw new Error('Invalid ISO 8601 time string: ' + value); | ||
return new (0, $625ad1e1f4c43bc1$exports.Time)($4c32e2d98e5a5134$var$parseNumber(m[1], 0, 23), m[2] ? $4c32e2d98e5a5134$var$parseNumber(m[2], 0, 59) : 0, m[3] ? $4c32e2d98e5a5134$var$parseNumber(m[3], 0, 59) : 0, m[4] ? $4c32e2d98e5a5134$var$parseNumber(m[4], 0, Infinity) * 1000 : 0); | ||
@@ -63,3 +63,3 @@ } | ||
let m = value.match($4c32e2d98e5a5134$var$DATE_RE); | ||
if (!m) throw new Error("Invalid ISO 8601 date string: " + value); | ||
if (!m) throw new Error('Invalid ISO 8601 date string: ' + value); | ||
let date = new (0, $625ad1e1f4c43bc1$exports.CalendarDate)($4c32e2d98e5a5134$var$parseNumber(m[1], 0, 9999), $4c32e2d98e5a5134$var$parseNumber(m[2], 1, 12), 1); | ||
@@ -71,3 +71,3 @@ date.day = $4c32e2d98e5a5134$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date)); | ||
let m = value.match($4c32e2d98e5a5134$var$DATE_TIME_RE); | ||
if (!m) throw new Error("Invalid ISO 8601 date time string: " + value); | ||
if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value); | ||
let date = new (0, $625ad1e1f4c43bc1$exports.CalendarDateTime)($4c32e2d98e5a5134$var$parseNumber(m[1], 1, 9999), $4c32e2d98e5a5134$var$parseNumber(m[2], 1, 12), 1, m[4] ? $4c32e2d98e5a5134$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $4c32e2d98e5a5134$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $4c32e2d98e5a5134$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $4c32e2d98e5a5134$var$parseNumber(m[7], 0, Infinity) * 1000 : 0); | ||
@@ -79,3 +79,3 @@ date.day = $4c32e2d98e5a5134$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date)); | ||
let m = value.match($4c32e2d98e5a5134$var$ZONED_DATE_TIME_RE); | ||
if (!m) throw new Error("Invalid ISO 8601 date time string: " + value); | ||
if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value); | ||
let date = new (0, $625ad1e1f4c43bc1$exports.ZonedDateTime)($4c32e2d98e5a5134$var$parseNumber(m[1], 1, 9999), $4c32e2d98e5a5134$var$parseNumber(m[2], 1, 12), 1, m[10], 0, m[4] ? $4c32e2d98e5a5134$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $4c32e2d98e5a5134$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $4c32e2d98e5a5134$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $4c32e2d98e5a5134$var$parseNumber(m[7], 0, Infinity) * 1000 : 0); | ||
@@ -87,3 +87,3 @@ date.day = $4c32e2d98e5a5134$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date)); | ||
var _m_; | ||
date.offset = $4c32e2d98e5a5134$var$parseNumber(m[8], -23, 23) * 3600000 + $4c32e2d98e5a5134$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : "0", 0, 59) * 60000; | ||
date.offset = $4c32e2d98e5a5134$var$parseNumber(m[8], -23, 23) * 3600000 + $4c32e2d98e5a5134$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : '0', 0, 59) * 60000; | ||
ms = (0, $4ae0260a69729f1d$exports.epochFromDate)(date) - date.offset; | ||
@@ -99,7 +99,7 @@ // Validate offset against parsed date. | ||
let m = value.match($4c32e2d98e5a5134$var$ABSOLUTE_RE); | ||
if (!m) throw new Error("Invalid ISO 8601 date time string: " + value); | ||
if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value); | ||
let date = new (0, $625ad1e1f4c43bc1$exports.ZonedDateTime)($4c32e2d98e5a5134$var$parseNumber(m[1], 1, 9999), $4c32e2d98e5a5134$var$parseNumber(m[2], 1, 12), 1, timeZone, 0, m[4] ? $4c32e2d98e5a5134$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $4c32e2d98e5a5134$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $4c32e2d98e5a5134$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $4c32e2d98e5a5134$var$parseNumber(m[7], 0, Infinity) * 1000 : 0); | ||
date.day = $4c32e2d98e5a5134$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date)); | ||
var _m_; | ||
if (m[8]) date.offset = $4c32e2d98e5a5134$var$parseNumber(m[8], -23, 23) * 3600000 + $4c32e2d98e5a5134$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : "0", 0, 59) * 60000; | ||
if (m[8]) date.offset = $4c32e2d98e5a5134$var$parseNumber(m[8], -23, 23) * 3600000 + $4c32e2d98e5a5134$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : '0', 0, 59) * 60000; | ||
return (0, $4ae0260a69729f1d$exports.toTimeZone)(date, timeZone); | ||
@@ -116,7 +116,7 @@ } | ||
function $4c32e2d98e5a5134$export$f59dee82248f5ad4(time) { | ||
return `${String(time.hour).padStart(2, "0")}:${String(time.minute).padStart(2, "0")}:${String(time.second).padStart(2, "0")}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ""}`; | ||
return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`; | ||
} | ||
function $4c32e2d98e5a5134$export$60dfd74aa96791bd(date) { | ||
let gregorianDate = (0, $4ae0260a69729f1d$exports.toCalendar)(date, new (0, $af14c9812fdceb33$exports.GregorianCalendar)()); | ||
return `${String(gregorianDate.year).padStart(4, "0")}-${String(gregorianDate.month).padStart(2, "0")}-${String(gregorianDate.day).padStart(2, "0")}`; | ||
return `${String(gregorianDate.year).padStart(4, '0')}-${String(gregorianDate.month).padStart(2, '0')}-${String(gregorianDate.day).padStart(2, '0')}`; | ||
} | ||
@@ -128,7 +128,7 @@ function $4c32e2d98e5a5134$export$4223de14708adc63(date) { | ||
function $4c32e2d98e5a5134$var$offsetToString(offset) { | ||
let sign = Math.sign(offset) < 0 ? "-" : "+"; | ||
let sign = Math.sign(offset) < 0 ? '-' : '+'; | ||
offset = Math.abs(offset); | ||
let offsetHours = Math.floor(offset / 3600000); | ||
let offsetMinutes = offset % 3600000 / 60000; | ||
return `${sign}${String(offsetHours).padStart(2, "0")}:${String(offsetMinutes).padStart(2, "0")}`; | ||
return `${sign}${String(offsetHours).padStart(2, '0')}:${String(offsetMinutes).padStart(2, '0')}`; | ||
} | ||
@@ -146,3 +146,3 @@ function $4c32e2d98e5a5134$export$bf79f1ebf4b18792(date) { | ||
const sign = isNegative ? -1 : 1; | ||
return sign * $4c32e2d98e5a5134$var$parseNumber(group.replace(",", "."), min, max); | ||
return sign * $4c32e2d98e5a5134$var$parseNumber(group.replace(',', '.'), min, max); | ||
} catch { | ||
@@ -149,0 +149,0 @@ throw new Error(`Invalid ISO 8601 Duration string: ${value}`); |
@@ -27,11 +27,11 @@ import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f, CalendarDateTime as $35ea8db9cb2ccb90$export$ca871e8dbb80966f, Time as $35ea8db9cb2ccb90$export$680ea196effce5f, ZonedDateTime as $35ea8db9cb2ccb90$export$d3b7288e7994edea} from "./CalendarDate.module.js"; | ||
const $fae977aafc393c5c$var$requiredDurationTimeGroups = [ | ||
"hours", | ||
"minutes", | ||
"seconds" | ||
'hours', | ||
'minutes', | ||
'seconds' | ||
]; | ||
const $fae977aafc393c5c$var$requiredDurationGroups = [ | ||
"years", | ||
"months", | ||
"weeks", | ||
"days", | ||
'years', | ||
'months', | ||
'weeks', | ||
'days', | ||
...$fae977aafc393c5c$var$requiredDurationTimeGroups | ||
@@ -41,3 +41,3 @@ ]; | ||
let m = value.match($fae977aafc393c5c$var$TIME_RE); | ||
if (!m) throw new Error("Invalid ISO 8601 time string: " + value); | ||
if (!m) throw new Error('Invalid ISO 8601 time string: ' + value); | ||
return new (0, $35ea8db9cb2ccb90$export$680ea196effce5f)($fae977aafc393c5c$var$parseNumber(m[1], 0, 23), m[2] ? $fae977aafc393c5c$var$parseNumber(m[2], 0, 59) : 0, m[3] ? $fae977aafc393c5c$var$parseNumber(m[3], 0, 59) : 0, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, Infinity) * 1000 : 0); | ||
@@ -47,3 +47,3 @@ } | ||
let m = value.match($fae977aafc393c5c$var$DATE_RE); | ||
if (!m) throw new Error("Invalid ISO 8601 date string: " + value); | ||
if (!m) throw new Error('Invalid ISO 8601 date string: ' + value); | ||
let date = new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)($fae977aafc393c5c$var$parseNumber(m[1], 0, 9999), $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1); | ||
@@ -55,3 +55,3 @@ date.day = $fae977aafc393c5c$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date)); | ||
let m = value.match($fae977aafc393c5c$var$DATE_TIME_RE); | ||
if (!m) throw new Error("Invalid ISO 8601 date time string: " + value); | ||
if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value); | ||
let date = new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)($fae977aafc393c5c$var$parseNumber(m[1], 1, 9999), $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $fae977aafc393c5c$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $fae977aafc393c5c$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $fae977aafc393c5c$var$parseNumber(m[7], 0, Infinity) * 1000 : 0); | ||
@@ -63,3 +63,3 @@ date.day = $fae977aafc393c5c$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date)); | ||
let m = value.match($fae977aafc393c5c$var$ZONED_DATE_TIME_RE); | ||
if (!m) throw new Error("Invalid ISO 8601 date time string: " + value); | ||
if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value); | ||
let date = new (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)($fae977aafc393c5c$var$parseNumber(m[1], 1, 9999), $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1, m[10], 0, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $fae977aafc393c5c$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $fae977aafc393c5c$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $fae977aafc393c5c$var$parseNumber(m[7], 0, Infinity) * 1000 : 0); | ||
@@ -71,3 +71,3 @@ date.day = $fae977aafc393c5c$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date)); | ||
var _m_; | ||
date.offset = $fae977aafc393c5c$var$parseNumber(m[8], -23, 23) * 3600000 + $fae977aafc393c5c$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : "0", 0, 59) * 60000; | ||
date.offset = $fae977aafc393c5c$var$parseNumber(m[8], -23, 23) * 3600000 + $fae977aafc393c5c$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : '0', 0, 59) * 60000; | ||
ms = (0, $11d87f3f76e88657$export$bd4fb2bc8bb06fb)(date) - date.offset; | ||
@@ -83,7 +83,7 @@ // Validate offset against parsed date. | ||
let m = value.match($fae977aafc393c5c$var$ABSOLUTE_RE); | ||
if (!m) throw new Error("Invalid ISO 8601 date time string: " + value); | ||
if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value); | ||
let date = new (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)($fae977aafc393c5c$var$parseNumber(m[1], 1, 9999), $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1, timeZone, 0, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $fae977aafc393c5c$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $fae977aafc393c5c$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $fae977aafc393c5c$var$parseNumber(m[7], 0, Infinity) * 1000 : 0); | ||
date.day = $fae977aafc393c5c$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date)); | ||
var _m_; | ||
if (m[8]) date.offset = $fae977aafc393c5c$var$parseNumber(m[8], -23, 23) * 3600000 + $fae977aafc393c5c$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : "0", 0, 59) * 60000; | ||
if (m[8]) date.offset = $fae977aafc393c5c$var$parseNumber(m[8], -23, 23) * 3600000 + $fae977aafc393c5c$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : '0', 0, 59) * 60000; | ||
return (0, $11d87f3f76e88657$export$538b00033cc11c75)(date, timeZone); | ||
@@ -100,7 +100,7 @@ } | ||
function $fae977aafc393c5c$export$f59dee82248f5ad4(time) { | ||
return `${String(time.hour).padStart(2, "0")}:${String(time.minute).padStart(2, "0")}:${String(time.second).padStart(2, "0")}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ""}`; | ||
return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`; | ||
} | ||
function $fae977aafc393c5c$export$60dfd74aa96791bd(date) { | ||
let gregorianDate = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(date, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)()); | ||
return `${String(gregorianDate.year).padStart(4, "0")}-${String(gregorianDate.month).padStart(2, "0")}-${String(gregorianDate.day).padStart(2, "0")}`; | ||
return `${String(gregorianDate.year).padStart(4, '0')}-${String(gregorianDate.month).padStart(2, '0')}-${String(gregorianDate.day).padStart(2, '0')}`; | ||
} | ||
@@ -112,7 +112,7 @@ function $fae977aafc393c5c$export$4223de14708adc63(date) { | ||
function $fae977aafc393c5c$var$offsetToString(offset) { | ||
let sign = Math.sign(offset) < 0 ? "-" : "+"; | ||
let sign = Math.sign(offset) < 0 ? '-' : '+'; | ||
offset = Math.abs(offset); | ||
let offsetHours = Math.floor(offset / 3600000); | ||
let offsetMinutes = offset % 3600000 / 60000; | ||
return `${sign}${String(offsetHours).padStart(2, "0")}:${String(offsetMinutes).padStart(2, "0")}`; | ||
return `${sign}${String(offsetHours).padStart(2, '0')}:${String(offsetMinutes).padStart(2, '0')}`; | ||
} | ||
@@ -130,3 +130,3 @@ function $fae977aafc393c5c$export$bf79f1ebf4b18792(date) { | ||
const sign = isNegative ? -1 : 1; | ||
return sign * $fae977aafc393c5c$var$parseNumber(group.replace(",", "."), min, max); | ||
return sign * $fae977aafc393c5c$var$parseNumber(group.replace(',', '.'), min, max); | ||
} catch { | ||
@@ -133,0 +133,0 @@ throw new Error(`Invalid ISO 8601 Duration string: ${value}`); |
@@ -26,3 +26,3 @@ var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js"); | ||
function $9cc5d3577ec40243$var$gregorianYear(date) { | ||
return date.era === "minguo" ? date.year + $9cc5d3577ec40243$var$TAIWAN_ERA_START : 1 - date.year + $9cc5d3577ec40243$var$TAIWAN_ERA_START; | ||
return date.era === 'minguo' ? date.year + $9cc5d3577ec40243$var$TAIWAN_ERA_START : 1 - date.year + $9cc5d3577ec40243$var$TAIWAN_ERA_START; | ||
} | ||
@@ -32,7 +32,7 @@ function $9cc5d3577ec40243$var$gregorianToTaiwan(year) { | ||
if (y > 0) return [ | ||
"minguo", | ||
'minguo', | ||
y | ||
]; | ||
else return [ | ||
"before_minguo", | ||
'before_minguo', | ||
1 - y | ||
@@ -53,4 +53,4 @@ ]; | ||
return [ | ||
"before_minguo", | ||
"minguo" | ||
'before_minguo', | ||
'minguo' | ||
]; | ||
@@ -64,3 +64,3 @@ } | ||
isInverseEra(date) { | ||
return date.era === "before_minguo"; | ||
return date.era === 'before_minguo'; | ||
} | ||
@@ -71,7 +71,7 @@ getDaysInMonth(date) { | ||
getYearsInEra(date) { | ||
return date.era === "before_minguo" ? 9999 : 9999 - $9cc5d3577ec40243$var$TAIWAN_ERA_START; | ||
return date.era === 'before_minguo' ? 9999 : 9999 - $9cc5d3577ec40243$var$TAIWAN_ERA_START; | ||
} | ||
constructor(...args){ | ||
super(...args); | ||
this.identifier = "roc" // Republic of China | ||
this.identifier = 'roc' // Republic of China | ||
; | ||
@@ -78,0 +78,0 @@ } |
@@ -20,3 +20,3 @@ import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f} from "./CalendarDate.module.js"; | ||
function $5f31bd6f0c8940b2$var$gregorianYear(date) { | ||
return date.era === "minguo" ? date.year + $5f31bd6f0c8940b2$var$TAIWAN_ERA_START : 1 - date.year + $5f31bd6f0c8940b2$var$TAIWAN_ERA_START; | ||
return date.era === 'minguo' ? date.year + $5f31bd6f0c8940b2$var$TAIWAN_ERA_START : 1 - date.year + $5f31bd6f0c8940b2$var$TAIWAN_ERA_START; | ||
} | ||
@@ -26,7 +26,7 @@ function $5f31bd6f0c8940b2$var$gregorianToTaiwan(year) { | ||
if (y > 0) return [ | ||
"minguo", | ||
'minguo', | ||
y | ||
]; | ||
else return [ | ||
"before_minguo", | ||
'before_minguo', | ||
1 - y | ||
@@ -47,4 +47,4 @@ ]; | ||
return [ | ||
"before_minguo", | ||
"minguo" | ||
'before_minguo', | ||
'minguo' | ||
]; | ||
@@ -58,3 +58,3 @@ } | ||
isInverseEra(date) { | ||
return date.era === "before_minguo"; | ||
return date.era === 'before_minguo'; | ||
} | ||
@@ -65,7 +65,7 @@ getDaysInMonth(date) { | ||
getYearsInEra(date) { | ||
return date.era === "before_minguo" ? 9999 : 9999 - $5f31bd6f0c8940b2$var$TAIWAN_ERA_START; | ||
return date.era === 'before_minguo' ? 9999 : 9999 - $5f31bd6f0c8940b2$var$TAIWAN_ERA_START; | ||
} | ||
constructor(...args){ | ||
super(...args); | ||
this.identifier = "roc" // Republic of China | ||
this.identifier = 'roc' // Republic of China | ||
; | ||
@@ -72,0 +72,0 @@ } |
@@ -20,3 +20,3 @@ | ||
const $4d88eff242b38a9e$export$7a5acbd77d414bd9 = { | ||
"001": 1, | ||
'001': 1, | ||
AD: 1, | ||
@@ -23,0 +23,0 @@ AE: 6, |
@@ -14,3 +14,3 @@ /* | ||
const $2fe286d2fb449abb$export$7a5acbd77d414bd9 = { | ||
"001": 1, | ||
'001': 1, | ||
AD: 1, | ||
@@ -17,0 +17,0 @@ AE: 6, |
{ | ||
"name": "@internationalized/date", | ||
"version": "3.5.4-nightly.4624+d80999e89", | ||
"version": "3.5.4", | ||
"description": "Internationalized calendar, date, and time manipulation utilities", | ||
@@ -30,3 +30,3 @@ "license": "Apache-2.0", | ||
}, | ||
"gitHead": "d80999e897b4d4db9fcfb4e9b8fcdc9fdd700882" | ||
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
0
996074