574 lines
16 KiB
JavaScript
574 lines
16 KiB
JavaScript
// Metro module 3502 (f3503).
|
|
import * as _getUTCDayOfYear from "./getUTCDayOfYear";
|
|
import { __esModule } from "./getUTCDayOfYear";
|
|
import * as _getUTCISOWeek from "./getUTCISOWeek";
|
|
import * as _getUTCISOWeekYear from "./getUTCISOWeekYear";
|
|
import * as _getUTCWeek from "./getUTCWeek";
|
|
import * as _getUTCWeekYear from "./getUTCWeekYear";
|
|
import * as _addLeadingZeros from "./addLeadingZeros";
|
|
import * as _Module3512 from "./Module3512";
|
|
const r13 = _getUTCDayOfYear ? __esModule ? _getUTCDayOfYear : {
|
|
default: _getUTCDayOfYear
|
|
} : {
|
|
default: _getUTCDayOfYear
|
|
};
|
|
let c1857_0 = r13;
|
|
let c1857_1 = _getUTCISOWeek ? _getUTCISOWeek.__esModule ? _getUTCISOWeek : {
|
|
default: _getUTCISOWeek
|
|
} : {
|
|
default: _getUTCISOWeek
|
|
};
|
|
let c1857_2 = _getUTCISOWeekYear ? _getUTCISOWeekYear.__esModule ? _getUTCISOWeekYear : {
|
|
default: _getUTCISOWeekYear
|
|
} : {
|
|
default: _getUTCISOWeekYear
|
|
};
|
|
let c1857_3 = _getUTCWeek ? _getUTCWeek.__esModule ? _getUTCWeek : {
|
|
default: _getUTCWeek
|
|
} : {
|
|
default: _getUTCWeek
|
|
};
|
|
let c1857_4 = _getUTCWeekYear ? _getUTCWeekYear.__esModule ? _getUTCWeekYear : {
|
|
default: _getUTCWeekYear
|
|
} : {
|
|
default: _getUTCWeekYear
|
|
};
|
|
let c1857_5 = _addLeadingZeros ? _addLeadingZeros.__esModule ? _addLeadingZeros : {
|
|
default: _addLeadingZeros
|
|
} : {
|
|
default: _addLeadingZeros
|
|
};
|
|
let c1857_6 = _Module3512 ? _Module3512.__esModule ? _Module3512 : {
|
|
default: _Module3512
|
|
} : {
|
|
default: _Module3512
|
|
};
|
|
let c1857_7 = "midnight";
|
|
let c1857_8 = "noon";
|
|
let c1857_9 = "morning";
|
|
let c1857_10 = "afternoon";
|
|
let c1857_11 = "evening";
|
|
let c1857_12 = "night";
|
|
export default {
|
|
G: function G(a0, a1, a2) {
|
|
const r0 = a0.getUTCFullYear() > 0 ? 1 : 0;
|
|
if (a1 !== "G" && a1 !== "GG" && a1 !== "GGG") {
|
|
if (a1 === "GGGGG") {
|
|
return a2.era(r0, {
|
|
width: "narrow"
|
|
});
|
|
}
|
|
return a2.era(r0, {
|
|
width: "wide"
|
|
});
|
|
}
|
|
return a2.era(r0, {
|
|
width: "abbreviated"
|
|
});
|
|
},
|
|
y: function y(a0, a1, a2) {
|
|
if (a1 === "yo") {
|
|
const uTCFullYear = a0.getUTCFullYear();
|
|
let r11 = uTCFullYear;
|
|
if (!(r11 > 0)) {
|
|
r11 = 1 - uTCFullYear;
|
|
}
|
|
return a2.ordinalNumber(r11, {
|
|
unit: "year"
|
|
});
|
|
}
|
|
return c1857_6.default.y(a0, a1);
|
|
},
|
|
Y: function Y(a0, a1, a2, a3) {
|
|
const r10 = (0, c1857_4.default)(a0, a3);
|
|
let r11 = r10;
|
|
if (!(r11 > 0)) {
|
|
r11 = 1 - r10;
|
|
}
|
|
if (a1 === "YY") {
|
|
return (0, c1857_5.default)(r11 % 100, 2);
|
|
}
|
|
return a1 === "Yo" ? a2.ordinalNumber(r11, {
|
|
unit: "year"
|
|
}) : (0, c1857_5.default)(r11, a1.length);
|
|
},
|
|
R: function R(a0, a1) {
|
|
return (0, c1857_5.default)((0, c1857_2.default)(a0), a1.length);
|
|
},
|
|
u: function u(a0, a1) {
|
|
return (0, c1857_5.default)(a0.getUTCFullYear(), a1.length);
|
|
},
|
|
Q: function Q(a0, a1, a2) {
|
|
const r11 = Math.ceil((a0.getUTCMonth() + 1) / 3);
|
|
if (a1 === "Q") {
|
|
return String(r11);
|
|
}
|
|
if (a1 === "QQ") {
|
|
return (0, c1857_5.default)(r11, 2);
|
|
}
|
|
if (a1 === "Qo") {
|
|
return a2.ordinalNumber(r11, {
|
|
unit: "quarter"
|
|
});
|
|
}
|
|
if (a1 === "QQQ") {
|
|
return a2.quarter(r11, {
|
|
width: "abbreviated",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
if (a1 === "QQQQQ") {
|
|
return a2.quarter(r11, {
|
|
width: "narrow",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return a2.quarter(r11, {
|
|
width: "wide",
|
|
context: "formatting"
|
|
});
|
|
},
|
|
q: function q(a0, a1, a2) {
|
|
const r11 = Math.ceil((a0.getUTCMonth() + 1) / 3);
|
|
if (a1 === "q") {
|
|
return String(r11);
|
|
}
|
|
if (a1 === "qq") {
|
|
return (0, c1857_5.default)(r11, 2);
|
|
}
|
|
if (a1 === "qo") {
|
|
return a2.ordinalNumber(r11, {
|
|
unit: "quarter"
|
|
});
|
|
}
|
|
if (a1 === "qqq") {
|
|
return a2.quarter(r11, {
|
|
width: "abbreviated",
|
|
context: "standalone"
|
|
});
|
|
}
|
|
if (a1 === "qqqqq") {
|
|
return a2.quarter(r11, {
|
|
width: "narrow",
|
|
context: "standalone"
|
|
});
|
|
}
|
|
return a2.quarter(r11, {
|
|
width: "wide",
|
|
context: "standalone"
|
|
});
|
|
},
|
|
M: function M(a0, a1, a2) {
|
|
const uTCMonth = a0.getUTCMonth();
|
|
if (a1 !== "M" && a1 !== "MM") {
|
|
if (a1 === "Mo") {
|
|
return a2.ordinalNumber(uTCMonth + 1, {
|
|
unit: "month"
|
|
});
|
|
}
|
|
if (a1 === "MMM") {
|
|
return a2.month(uTCMonth, {
|
|
width: "abbreviated",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
if (a1 === "MMMMM") {
|
|
return a2.month(uTCMonth, {
|
|
width: "narrow",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return a2.month(uTCMonth, {
|
|
width: "wide",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return c1857_6.default.M(a0, a1);
|
|
},
|
|
L: function L(a0, a1, a2) {
|
|
const uTCMonth = a0.getUTCMonth();
|
|
if (a1 === "L") {
|
|
return String(uTCMonth + 1);
|
|
}
|
|
if (a1 === "LL") {
|
|
return (0, c1857_5.default)(uTCMonth + 1, 2);
|
|
}
|
|
if (a1 === "Lo") {
|
|
return a2.ordinalNumber(uTCMonth + 1, {
|
|
unit: "month"
|
|
});
|
|
}
|
|
if (a1 === "LLL") {
|
|
return a2.month(uTCMonth, {
|
|
width: "abbreviated",
|
|
context: "standalone"
|
|
});
|
|
}
|
|
if (a1 === "LLLLL") {
|
|
return a2.month(uTCMonth, {
|
|
width: "narrow",
|
|
context: "standalone"
|
|
});
|
|
}
|
|
return a2.month(uTCMonth, {
|
|
width: "wide",
|
|
context: "standalone"
|
|
});
|
|
},
|
|
w: function w(a0, a1, a2, a3) {
|
|
const r7 = (0, c1857_3.default)(a0, a3);
|
|
return a1 === "wo" ? a2.ordinalNumber(r7, {
|
|
unit: "week"
|
|
}) : (0, c1857_5.default)(r7, a1.length);
|
|
},
|
|
I: function I(a0, a1, a2) {
|
|
const r5 = (0, c1857_1.default)(a0);
|
|
return a1 === "Io" ? a2.ordinalNumber(r5, {
|
|
unit: "week"
|
|
}) : (0, c1857_5.default)(r5, a1.length);
|
|
},
|
|
d: function d(a0, a1, a2) {
|
|
return a1 === "do" ? a2.ordinalNumber(a0.getUTCDate(), {
|
|
unit: "date"
|
|
}) : c1857_6.default.d(a0, a1);
|
|
},
|
|
D: function D(a0, a1, a2) {
|
|
const r5 = (0, c1857_0.default)(a0);
|
|
return a1 === "Do" ? a2.ordinalNumber(r5, {
|
|
unit: "dayOfYear"
|
|
}) : (0, c1857_5.default)(r5, a1.length);
|
|
},
|
|
E: function E(a0, a1, a2) {
|
|
const uTCDay = a0.getUTCDay();
|
|
if (a1 !== "E" && a1 !== "EE" && a1 !== "EEE") {
|
|
if (a1 === "EEEEE") {
|
|
return a2.day(uTCDay, {
|
|
width: "narrow",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
if (a1 === "EEEEEE") {
|
|
return a2.day(uTCDay, {
|
|
width: "short",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return a2.day(uTCDay, {
|
|
width: "wide",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return a2.day(uTCDay, {
|
|
width: "abbreviated",
|
|
context: "formatting"
|
|
});
|
|
},
|
|
e: function e(a0, a1, a2, a3) {
|
|
const uTCDay = a0.getUTCDay();
|
|
const r11 = (uTCDay - a3.weekStartsOn + 8) % 7 || 7;
|
|
if (a1 === "e") {
|
|
return String(r11);
|
|
}
|
|
if (a1 === "ee") {
|
|
return (0, c1857_5.default)(r11, 2);
|
|
}
|
|
if (a1 === "eo") {
|
|
return a2.ordinalNumber(r11, {
|
|
unit: "day"
|
|
});
|
|
}
|
|
if (a1 === "eee") {
|
|
return a2.day(uTCDay, {
|
|
width: "abbreviated",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
if (a1 === "eeeee") {
|
|
return a2.day(uTCDay, {
|
|
width: "narrow",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
if (a1 === "eeeeee") {
|
|
return a2.day(uTCDay, {
|
|
width: "short",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return a2.day(uTCDay, {
|
|
width: "wide",
|
|
context: "formatting"
|
|
});
|
|
},
|
|
c: function c(a0, a1, a2, a3) {
|
|
const uTCDay = a0.getUTCDay();
|
|
const r12 = (uTCDay - a3.weekStartsOn + 8) % 7 || 7;
|
|
if (a1 === "c") {
|
|
return String(r12);
|
|
}
|
|
if (a1 === "cc") {
|
|
return (0, c1857_5.default)(r12, a1.length);
|
|
}
|
|
if (a1 === "co") {
|
|
return a2.ordinalNumber(r12, {
|
|
unit: "day"
|
|
});
|
|
}
|
|
if (a1 === "ccc") {
|
|
return a2.day(uTCDay, {
|
|
width: "abbreviated",
|
|
context: "standalone"
|
|
});
|
|
}
|
|
if (a1 === "ccccc") {
|
|
return a2.day(uTCDay, {
|
|
width: "narrow",
|
|
context: "standalone"
|
|
});
|
|
}
|
|
if (a1 === "cccccc") {
|
|
return a2.day(uTCDay, {
|
|
width: "short",
|
|
context: "standalone"
|
|
});
|
|
}
|
|
return a2.day(uTCDay, {
|
|
width: "wide",
|
|
context: "standalone"
|
|
});
|
|
},
|
|
i: function i(a0, a1, a2) {
|
|
const uTCDay = a0.getUTCDay();
|
|
const r8 = uTCDay !== 0 ? uTCDay : 7;
|
|
if (a1 === "i") {
|
|
return String(r8);
|
|
}
|
|
if (a1 === "ii") {
|
|
return (0, c1857_5.default)(r8, a1.length);
|
|
}
|
|
if (a1 === "io") {
|
|
return a2.ordinalNumber(r8, {
|
|
unit: "day"
|
|
});
|
|
}
|
|
if (a1 === "iii") {
|
|
return a2.day(uTCDay, {
|
|
width: "abbreviated",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
if (a1 === "iiiii") {
|
|
return a2.day(uTCDay, {
|
|
width: "narrow",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
if (a1 === "iiiiii") {
|
|
return a2.day(uTCDay, {
|
|
width: "short",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return a2.day(uTCDay, {
|
|
width: "wide",
|
|
context: "formatting"
|
|
});
|
|
},
|
|
a: function a(a0, a1, a2) {
|
|
const r5 = 1 <= a0.getUTCHours() / 12 ? "pm" : "am";
|
|
if (a1 !== "a" && a1 !== "aa") {
|
|
if (a1 === "aaa") {
|
|
return a2.dayPeriod(r5, {
|
|
width: "abbreviated",
|
|
context: "formatting"
|
|
}).toLowerCase();
|
|
}
|
|
if (a1 === "aaaaa") {
|
|
return a2.dayPeriod(r5, {
|
|
width: "narrow",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return a2.dayPeriod(r5, {
|
|
width: "wide",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return a2.dayPeriod(r5, {
|
|
width: "abbreviated",
|
|
context: "formatting"
|
|
});
|
|
},
|
|
b: function b(a0, a1, a2) {
|
|
const uTCHours = a0.getUTCHours();
|
|
const r5 = uTCHours === 12 ? c1857_8 : uTCHours === 0 ? c1857_7 : 1 <= uTCHours / 12 ? "pm" : "am";
|
|
if (a1 !== "b" && a1 !== "bb") {
|
|
if (a1 === "bbb") {
|
|
return a2.dayPeriod(r5, {
|
|
width: "abbreviated",
|
|
context: "formatting"
|
|
}).toLowerCase();
|
|
}
|
|
if (a1 === "bbbbb") {
|
|
return a2.dayPeriod(r5, {
|
|
width: "narrow",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return a2.dayPeriod(r5, {
|
|
width: "wide",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return a2.dayPeriod(r5, {
|
|
width: "abbreviated",
|
|
context: "formatting"
|
|
});
|
|
},
|
|
B: function B(a0, a1, a2) {
|
|
const uTCHours = a0.getUTCHours();
|
|
const r4 = uTCHours >= 17 ? c1857_11 : uTCHours >= 12 ? c1857_10 : uTCHours >= 4 ? c1857_9 : c1857_12;
|
|
if (a1 !== "B" && a1 !== "BB" && a1 !== "BBB") {
|
|
if (a1 === "BBBBB") {
|
|
return a2.dayPeriod(r4, {
|
|
width: "narrow",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return a2.dayPeriod(r4, {
|
|
width: "wide",
|
|
context: "formatting"
|
|
});
|
|
}
|
|
return a2.dayPeriod(r4, {
|
|
width: "abbreviated",
|
|
context: "formatting"
|
|
});
|
|
},
|
|
h: function h(a0, a1, a2) {
|
|
if (a1 === "ho") {
|
|
let r0 = a0.getUTCHours() % 12;
|
|
if (r0 === 0) {
|
|
r0 = 12;
|
|
}
|
|
return a2.ordinalNumber(r0, {
|
|
unit: "hour"
|
|
});
|
|
}
|
|
return c1857_6.default.h(a0, a1);
|
|
},
|
|
H: function H(a0, a1, a2) {
|
|
return a1 === "Ho" ? a2.ordinalNumber(a0.getUTCHours(), {
|
|
unit: "hour"
|
|
}) : c1857_6.default.H(a0, a1);
|
|
},
|
|
K: function K(a0, a1, a2) {
|
|
const r7 = a0.getUTCHours() % 12;
|
|
return a1 === "Ko" ? a2.ordinalNumber(r7, {
|
|
unit: "hour"
|
|
}) : (0, c1857_5.default)(r7, a1.length);
|
|
},
|
|
k: function k(a0, a1, a2) {
|
|
let r6 = a0.getUTCHours();
|
|
if (r6 === 0) {
|
|
r6 = 24;
|
|
}
|
|
return a1 === "ko" ? a2.ordinalNumber(r6, {
|
|
unit: "hour"
|
|
}) : (0, c1857_5.default)(r6, a1.length);
|
|
},
|
|
m: function m(a0, a1, a2) {
|
|
return a1 === "mo" ? a2.ordinalNumber(a0.getUTCMinutes(), {
|
|
unit: "minute"
|
|
}) : c1857_6.default.m(a0, a1);
|
|
},
|
|
s: function(a0, a1, a2) {
|
|
return a1 === "so" ? a2.ordinalNumber(a0.getUTCSeconds(), {
|
|
unit: "second"
|
|
}) : c1857_6.default.s(a0, a1);
|
|
},
|
|
S: function S(a0, a1) {
|
|
return c1857_6.default.S(a0, a1);
|
|
},
|
|
X: function X(a0, a1, a2, a3) {
|
|
let r75;
|
|
const timezoneOffset = (a3._originalDate || a0).getTimezoneOffset();
|
|
if (timezoneOffset === 0) {
|
|
return "Z";
|
|
}
|
|
if (a1 === "X") {
|
|
if (timezoneOffset % 60 === 0) {
|
|
r75 = (timezoneOffset > 0 ? "-" : "+") + (0, c1857_5.default)(Math.abs(timezoneOffset) / 60, 2);
|
|
} else {
|
|
const r58 = timezoneOffset > 0 ? "-" : "+";
|
|
const r62 = Math.abs(timezoneOffset);
|
|
r75 = r58 + (0, c1857_5.default)(Math.floor(r62 / 60), 2) + (0, c1857_5.default)(r62 % 60, 2);
|
|
}
|
|
return r75;
|
|
}
|
|
if (a1 !== "XXXX" && a1 !== "XX") {
|
|
const r9 = timezoneOffset > 0 ? "-" : "+";
|
|
const r20 = Math.abs(timezoneOffset);
|
|
return r9 + (0, c1857_5.default)(Math.floor(r20 / 60), 2) + ":" + (0, c1857_5.default)(r20 % 60, 2);
|
|
}
|
|
const r35 = timezoneOffset > 0 ? "-" : "+";
|
|
const r39 = Math.abs(timezoneOffset);
|
|
return r35 + (0, c1857_5.default)(Math.floor(r39 / 60), 2) + (0, c1857_5.default)(r39 % 60, 2);
|
|
},
|
|
x: function x(a0, a1, a2, a3) {
|
|
let r77;
|
|
const timezoneOffset = (a3._originalDate || a0).getTimezoneOffset();
|
|
if (a1 === "x") {
|
|
if (timezoneOffset % 60 === 0) {
|
|
r77 = (timezoneOffset > 0 ? "-" : "+") + (0, c1857_5.default)(Math.abs(timezoneOffset) / 60, 2);
|
|
} else {
|
|
const r60 = timezoneOffset > 0 ? "-" : "+";
|
|
const r64 = Math.abs(timezoneOffset);
|
|
r77 = r60 + (0, c1857_5.default)(Math.floor(r64 / 60), 2) + (0, c1857_5.default)(r64 % 60, 2);
|
|
}
|
|
return r77;
|
|
}
|
|
if (a1 !== "xxxx" && a1 !== "xx") {
|
|
const r9 = timezoneOffset > 0 ? "-" : "+";
|
|
const r20 = Math.abs(timezoneOffset);
|
|
return r9 + (0, c1857_5.default)(Math.floor(r20 / 60), 2) + ":" + (0, c1857_5.default)(r20 % 60, 2);
|
|
}
|
|
const r37 = timezoneOffset > 0 ? "-" : "+";
|
|
const r41 = Math.abs(timezoneOffset);
|
|
return r37 + (0, c1857_5.default)(Math.floor(r41 / 60), 2) + (0, c1857_5.default)(r41 % 60, 2);
|
|
},
|
|
O: function O(a0, a1, a2, a3) {
|
|
const timezoneOffset = (a3._originalDate || a0).getTimezoneOffset();
|
|
if (a1 !== "O" && a1 !== "OO" && a1 !== "OOO") {
|
|
const r8 = timezoneOffset > 0 ? "-" : "+";
|
|
const r19 = Math.abs(timezoneOffset);
|
|
return "GMT" + (r8 + (0, c1857_5.default)(Math.floor(r19 / 60), 2) + ":" + (0, c1857_5.default)(r19 % 60, 2));
|
|
}
|
|
const r38 = timezoneOffset > 0 ? "-" : "+";
|
|
const r42 = Math.abs(timezoneOffset);
|
|
const r46 = Math.floor(r42 / 60);
|
|
const r47 = r42 % 60;
|
|
return "GMT" + (r47 === 0 ? r38 + String(r46) : r38 + String(r46) + ":" + (0, c1857_5.default)(r47, 2));
|
|
},
|
|
z: function z(a0, a1, a2, a3) {
|
|
const timezoneOffset = (a3._originalDate || a0).getTimezoneOffset();
|
|
if (a1 !== "z" && a1 !== "zz" && a1 !== "zzz") {
|
|
const r8 = timezoneOffset > 0 ? "-" : "+";
|
|
const r19 = Math.abs(timezoneOffset);
|
|
return "GMT" + (r8 + (0, c1857_5.default)(Math.floor(r19 / 60), 2) + ":" + (0, c1857_5.default)(r19 % 60, 2));
|
|
}
|
|
const r38 = timezoneOffset > 0 ? "-" : "+";
|
|
const r42 = Math.abs(timezoneOffset);
|
|
const r46 = Math.floor(r42 / 60);
|
|
const r47 = r42 % 60;
|
|
return "GMT" + (r47 === 0 ? r38 + String(r46) : r38 + String(r46) + ":" + (0, c1857_5.default)(r47, 2));
|
|
},
|
|
t: function t(a0, a1, a2, a3) {
|
|
return (0, c1857_5.default)(Math.floor((a3._originalDate || a0).getTime() / 1000), a1.length);
|
|
},
|
|
T: function T(a0, a1, a2, a3) {
|
|
return (0, c1857_5.default)((a3._originalDate || a0).getTime(), a1.length);
|
|
}
|
|
};
|
|
module.exports = exports.default;
|