dynamic-html-helpers 1.4.5 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1553,31 +1553,31 @@ ${r}`), g2;
|
|
|
1553
1553
|
}, get re() {
|
|
1554
1554
|
return new RegExp(`\\b(${Object.keys(a.fixed).join("|")})\\b`, "g");
|
|
1555
1555
|
} }, s = (i = "dtf", y = 0) => {
|
|
1556
|
-
let
|
|
1556
|
+
let D2 = ` ${i.replace(/(?<=\{)(.+?)(?=})/g, (d) => `[${y++}]`).replace(/[{}]/g, "").trim()} `, h2 = i.match(/(?<=\{)(.+?)(?=})/g) || [];
|
|
1557
1557
|
return { get texts() {
|
|
1558
|
-
return
|
|
1558
|
+
return h2;
|
|
1559
1559
|
}, formatString(d) {
|
|
1560
|
-
|
|
1560
|
+
D2 = d;
|
|
1561
1561
|
}, set formatStr(d) {
|
|
1562
|
-
|
|
1562
|
+
D2 = d;
|
|
1563
1563
|
}, get formatStr() {
|
|
1564
|
-
return
|
|
1564
|
+
return D2;
|
|
1565
1565
|
}, get units() {
|
|
1566
|
-
return
|
|
1566
|
+
return D2.match(o.re) || [];
|
|
1567
1567
|
}, finalize(d = "", b2 = "", v2 = "", $3 = "") {
|
|
1568
|
-
return
|
|
1568
|
+
return D2.replace(/~([\d+]?)/g, "$1").replace(/dtf/, d).replace(/era/, v2).replace(/dp\b|~dp\b/, b2).replace(/yn\b/, $3).replace(/\[(\d+?)]/g, (S, Me2) => h2[Me2].trim()).trim();
|
|
1569
1569
|
} };
|
|
1570
|
-
}, u2 = (i) => i.replace(/\s+/g, ""), c = (...i) => i?.reduce((y,
|
|
1571
|
-
let
|
|
1570
|
+
}, u2 = (i) => i.replace(/\s+/g, ""), c = (...i) => i?.reduce((y, D2) => ({ ...y, ...o.retrieveDyn(D2) || o.fixed[D2] }), o.fixed.dl), l = (i, y, D2) => {
|
|
1571
|
+
let h2 = c(...u2(D2).split(",")), d = Intl.DateTimeFormat(h2.locale, h2).format(i);
|
|
1572
1572
|
return y.finalize(d);
|
|
1573
|
-
}, m = (i, y,
|
|
1574
|
-
let
|
|
1575
|
-
return d.ms =
|
|
1573
|
+
}, m = (i, y, D2, h2) => i.toLocaleString(y, { timeZone: D2, month: h2 ? t : n }), T3 = (i, y, D2) => {
|
|
1574
|
+
let h2 = c(...y.units.concat(u2(D2).split(",")).flat()), d = { ...o.fixed }, b2 = ($3, S) => h2[$3] === "numeric" && S.startsWith("0") ? S.slice(1) : S, v2 = Intl.DateTimeFormat(h2.locale, h2).formatToParts(i).reduce(($3, S) => S.type === "literal" && /[ ,/-]/.test(S.value) ? $3 : { ...$3, [S.type]: b2(S.type, S.value) }, {});
|
|
1575
|
+
return d.ms = h2.fractionalSecondDigits ? d.msp : d.ms, d.yyyy = v2.relatedYear ? d.ry : d.yyyy, y.formatStr = y.formatStr.replace(o.re, ($3) => /^(M|MM)$/.test($3) ? m(i, h2.locale, h2.timeZone, /^M$/.test($3)) : v2[Object.keys(d[$3]).shift()] || $3), y.finalize(void 0, v2.dayPeriod, v2.era, v2.yearName);
|
|
1576
1576
|
};
|
|
1577
|
-
return (i, y,
|
|
1577
|
+
return (i, y, D2 = "l:default") => /ds:|ts:/.test(D2) ? l(i, s(void 0), D2) : T3(i, s(y || void 0), D2);
|
|
1578
1578
|
}
|
|
1579
|
-
var ue2 =
|
|
1580
|
-
function
|
|
1579
|
+
var ue2 = ke2;
|
|
1580
|
+
function ke2() {
|
|
1581
1581
|
let e = (t, a) => {
|
|
1582
1582
|
let o = isNaN(new Date(t)), s = isNaN(new Date(a));
|
|
1583
1583
|
if (s) {
|
|
@@ -1597,18 +1597,18 @@ ${r}`), g2;
|
|
|
1597
1597
|
return function({ start: t, end: a, diffs: o = {} } = {}) {
|
|
1598
1598
|
let s = e(t, a), u2 = a > t ? "+" : "-";
|
|
1599
1599
|
if (s.error) return s;
|
|
1600
|
-
let c = Math.abs(t - a), l = new Date(c), m = l.getUTCFullYear() - 1970, T3 = l.getUTCMonth(), i = l.getUTCDate() - 1, y = i % 7,
|
|
1601
|
-
o = { ...o, fromUTC: t, toUTC: a, sign: "", years: m, months: T3, days: i, hours:
|
|
1602
|
-
let S =
|
|
1603
|
-
return o.clean !== "Dates are equal" && (o.sign = u2, o.jsPeriod = `${u2}P${m > 0 ? `${m}Y` : ""}${T3 > 0 ? `${T3}M` : ""}${
|
|
1600
|
+
let c = Math.abs(t - a), l = new Date(c), m = l.getUTCFullYear() - 1970, T3 = l.getUTCMonth(), i = l.getUTCDate() - 1, y = i % 7, D2 = Math.floor(i / 7), h2 = l.getUTCHours(), d = l.getUTCMinutes(), b2 = l.getUTCSeconds(), v2 = l.getUTCMilliseconds(), $3 = Math.floor(c / 864e5);
|
|
1601
|
+
o = { ...o, fromUTC: t, toUTC: a, sign: "", years: m, months: T3, days: i, hours: h2, minutes: d, seconds: b2, milliseconds: v2, diffInDays: $3 }, o.full = r({ values: o, full: true }), o.clean = r({ values: o }), o.equalDates = o.clean === "Dates are equal";
|
|
1602
|
+
let S = h2 + d + b2 > 0 ? "T" : "";
|
|
1603
|
+
return o.clean !== "Dates are equal" && (o.sign = u2, o.jsPeriod = `${u2}P${m > 0 ? `${m}Y` : ""}${T3 > 0 ? `${T3}M` : ""}${D2 > 0 ? `${D2}W` : ""}${y > 0 ? `${y}D` : ""}${S}${h2 > 0 ? `${h2}H` : ""}${d > 0 ? `${d}M` : ""}${b2 > 0 ? `${b2}S` : ""}`, o.ISOPeriod = `P${m > 0 ? `${m}Y` : ""}${T3 > 0 ? `${T3}M` : ""}${i > 0 ? `${i}D` : ""}${S}${h2 > 0 ? `${h2}H` : ""}${d > 0 ? `${d}M` : ""}${b2 > 0 ? `${b2}S` : ""}`), o;
|
|
1604
1604
|
};
|
|
1605
1605
|
function n() {
|
|
1606
1606
|
let t = (...l) => (m) => l.reduce((T3, i) => i(T3), m), a = (l, m) => l === 1 ? m.slice(0, -1) : m;
|
|
1607
1607
|
return t(({ values: l, full: m }) => [Object.entries(l).filter(([T3]) => /^(years|month|days|hours|minutes|seconds)/i.test(T3)), m], ([l, m]) => m ? l : l.filter(([, T3]) => m ? +T3 : T3 > 0), (l) => l.reduce((m, [T3, i]) => [...m, `${i} ${a(i, T3)}`], []), (l) => l.length < 1 ? "Dates are equal" : `${l.slice(0, -1).join(", ")}${l.length > 1 ? " and " : ""}${l.slice(-1).shift()}`);
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
|
-
var ie2 =
|
|
1611
|
-
function
|
|
1610
|
+
var ie2 = Ce2;
|
|
1611
|
+
function Ce2() {
|
|
1612
1612
|
let e = Object.entries({ year: "FullYear", month: "Month", date: "Date", day: "Date", hour: "Hours", minute: "Minutes", second: "Seconds", millisecond: "Milliseconds" }).reduce((t, [a, o]) => ({ ...t, [a]: o, [`${a}s`]: o }), {}), r = false, n = function(...t) {
|
|
1613
1613
|
let a = t.length === 1;
|
|
1614
1614
|
return r = t[0].trim().startsWith("subtract,"), r && (t = a ? t[0].trim().replace(/^subtract,/i, "").split(",").map((o) => o.trim()) : t.filter((o) => !o.startsWith("subtract"))), a && !r && (t = t[0].split(",").map((o) => o.trim())), t.map(function(o) {
|
|
@@ -1631,13 +1631,13 @@ ${r}`), g2;
|
|
|
1631
1631
|
}
|
|
1632
1632
|
var de = ue2();
|
|
1633
1633
|
var ge2 = Pe2();
|
|
1634
|
-
var
|
|
1634
|
+
var Z2 = ie2();
|
|
1635
1635
|
var Ae2 = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
1636
1636
|
var ye2 = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
|
|
1637
1637
|
function q2(e, ...r) {
|
|
1638
|
-
return
|
|
1638
|
+
return Z2(e, ...r), e;
|
|
1639
1639
|
}
|
|
1640
|
-
function
|
|
1640
|
+
function De2(e, r = false) {
|
|
1641
1641
|
let n = K2(e.clone, { sunday: r }), t = [n];
|
|
1642
1642
|
return { weekStart: n.format("WD", "l:en-GB"), inputDate: e, dates: t.concat([...Array(6)].map((a, o) => n.clone.addDays(o + 1))) };
|
|
1643
1643
|
}
|
|
@@ -1652,7 +1652,7 @@ ${r}`), g2;
|
|
|
1652
1652
|
let t = e.clone.relocate(g);
|
|
1653
1653
|
return n = (n || "").startsWith("+") ? `${t.localeInfo.formatOptions},${n.slice(1)}` : n || t.localeInfo.formatOptions, I2(t, r, n);
|
|
1654
1654
|
}
|
|
1655
|
-
function
|
|
1655
|
+
function he2(e, r) {
|
|
1656
1656
|
let n = de({ start: e, end: r || e });
|
|
1657
1657
|
return parseInt(`${n.sign}${n.diffInDays}`);
|
|
1658
1658
|
}
|
|
@@ -1680,7 +1680,7 @@ ${r}`), g2;
|
|
|
1680
1680
|
return n[1] -= 1, n;
|
|
1681
1681
|
}
|
|
1682
1682
|
function Ue2(e) {
|
|
1683
|
-
let r = new Intl.Locale(e.
|
|
1683
|
+
let r = new Intl.Locale(e.locale), n = r.weekInfo ? r.weekInfo.firstDay : r.getWeekInfo ? r.getWeekInfo().firstDay : 1;
|
|
1684
1684
|
return n = n === 7 ? 0 : n, ye2[n];
|
|
1685
1685
|
}
|
|
1686
1686
|
function K2(e, { sunday: r = false } = {}) {
|
|
@@ -1693,7 +1693,7 @@ ${r}`), g2;
|
|
|
1693
1693
|
}
|
|
1694
1694
|
function Q2({ start: e, end: r } = {}) {
|
|
1695
1695
|
r || (r = e.clone), r?.clone || (r = f(r, { timeZone: e.timeZone })), e = f(me(e, e.timeZone), { timeZone: e.timeZone }), r = f(me(r, r.timeZone), { timeZone: r.timeZone });
|
|
1696
|
-
let n = de({ start: e, end: r, diffs: { timeZoneStart: e.timeZone, timeZoneEnd: r.timeZone } }), t = Le2(r, e), a = n.sign.startsWith("-") ? "ahead of" : "behind", [o, s] = t.map((l) => Math.abs(l)), [u2, c] = [`${o} ${
|
|
1696
|
+
let n = de({ start: e, end: r, diffs: { timeZoneStart: e.timeZone, timeZoneEnd: r.timeZone } }), t = Le2(r, e), a = n.sign.startsWith("-") ? "ahead of" : "behind", [o, s] = t.map((l) => Math.abs(l)), [u2, c] = [`${o} ${C(o, "hour")}`, `${s} ${C(s, "minute")}`];
|
|
1697
1697
|
return n.timeZonesOffsetDifference = n.sign.length < 1 || o + s === 0 ? `Offsets of ${e.timeZone} and ${r.timeZone} are equal` : `${e.timeZone} is ${u2}${s > 0 ? ` and ${c}` : ""} ${a} ${r.timeZone}`, n;
|
|
1698
1698
|
}
|
|
1699
1699
|
function R2(e, r) {
|
|
@@ -1704,12 +1704,12 @@ ${r}`), g2;
|
|
|
1704
1704
|
function le2(e, r = 2) {
|
|
1705
1705
|
return `${e}`.padStart(r, "0");
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1707
|
+
function C(e, r) {
|
|
1708
1708
|
return `${r}${e > 1 || e === 0 ? "s" : ""}`;
|
|
1709
1709
|
}
|
|
1710
1710
|
function xe2(e) {
|
|
1711
1711
|
if (/00:00/.test(e)) return "no time diffence to";
|
|
1712
|
-
let r = e.slice(1).split(":").map(Number), [n, t] = r, a =
|
|
1712
|
+
let r = e.slice(1).split(":").map(Number), [n, t] = r, a = C(n, "hour"), o = C(t, "minute"), s = e.startsWith("+");
|
|
1713
1713
|
return t > 0 ? `${n} ${a} and ${t} ${o} ${s ? "ahead of" : "behind"}` : `${n} ${a} ${s ? "ahead of" : "behind"}`;
|
|
1714
1714
|
}
|
|
1715
1715
|
function ce2(e, r, n) {
|
|
@@ -1768,10 +1768,10 @@ ${r}`), g2;
|
|
|
1768
1768
|
return new Date(new Date(e).toLocaleString("en", n));
|
|
1769
1769
|
}
|
|
1770
1770
|
function z2(e, { year: r, month: n, date: t } = {}) {
|
|
1771
|
-
return
|
|
1771
|
+
return w2(r) && e.setFullYear(parseInt(r)), w2(t) && e.setDate(parseInt(t)), w2(n) && e.setMonth(parseInt(n)), e;
|
|
1772
1772
|
}
|
|
1773
1773
|
function N2(e, { hours: r, minutes: n, seconds: t, milliseconds: a } = {}) {
|
|
1774
|
-
return
|
|
1774
|
+
return w2(r) && e.setHours(parseInt(r)), w2(n) && e.setMinutes(parseInt(n)), w2(t) && e.setSeconds(parseInt(t)), w2(a) && e.setMilliseconds(parseInt(a)), e;
|
|
1775
1775
|
}
|
|
1776
1776
|
function $e2(e) {
|
|
1777
1777
|
return e?.constructor === Date || e?.value;
|
|
@@ -1804,15 +1804,15 @@ ${r}`), g2;
|
|
|
1804
1804
|
function P2(e, r) {
|
|
1805
1805
|
return r = r || e?.timeZone || g.timeZone, e = e?.hasDST ? e : e?.constructor === Date ? f(e, { timeZone: r }) : f({ timeZone: r }), e.hasDST ? !/standard/i.test(e.toString()) : false;
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function we2(e, { locale: r, timeZone: n, l: t, tz: a } = {}) {
|
|
1808
1808
|
return e.localeInfo = p({ locale: t || r || e.l || e.locale, timeZone: a || n || e.tz || e.timeZone }), e;
|
|
1809
1809
|
}
|
|
1810
|
-
function
|
|
1810
|
+
function Ze2(e, r) {
|
|
1811
1811
|
return $e2(r) && (e = f(r.value || r, r.localeInfo || e.localeInfo)), e;
|
|
1812
1812
|
}
|
|
1813
|
-
function
|
|
1813
|
+
function k2(e, r) {
|
|
1814
1814
|
let n = ne2(new Date(e, 11, r || 31));
|
|
1815
|
-
return n === 1 ?
|
|
1815
|
+
return n === 1 ? k2(e, (r || 31) - 1) : n;
|
|
1816
1816
|
}
|
|
1817
1817
|
function re2(e, r) {
|
|
1818
1818
|
let n = e.month;
|
|
@@ -1844,7 +1844,7 @@ ${r}`), g2;
|
|
|
1844
1844
|
}, cloneWith(o) {
|
|
1845
1845
|
return te2(t, o);
|
|
1846
1846
|
}, daysUntil(o) {
|
|
1847
|
-
return
|
|
1847
|
+
return he2(t, o);
|
|
1848
1848
|
}, differenceTo(o) {
|
|
1849
1849
|
return Q2({ start: t, end: o });
|
|
1850
1850
|
}, differenceUntil(o) {
|
|
@@ -1856,7 +1856,7 @@ ${r}`), g2;
|
|
|
1856
1856
|
}, fullMonth(o) {
|
|
1857
1857
|
return L2(t, o);
|
|
1858
1858
|
}, fullWeek(o = false) {
|
|
1859
|
-
return
|
|
1859
|
+
return De2(t, !!o);
|
|
1860
1860
|
}, isFuture(o) {
|
|
1861
1861
|
return W2(t, { start: t, end: o, future: true });
|
|
1862
1862
|
}, isPast(o) {
|
|
@@ -1868,9 +1868,9 @@ ${r}`), g2;
|
|
|
1868
1868
|
}, previous(o, s) {
|
|
1869
1869
|
return x(t, { day: o, next: false, preserveTodayWhenEqual: !!s });
|
|
1870
1870
|
}, relocate({ locale: o, timeZone: s, l: u2, tz: c } = {}) {
|
|
1871
|
-
return
|
|
1871
|
+
return we2(t, { locale: o, timeZone: s, l: u2, tz: c });
|
|
1872
1872
|
}, revalue(o) {
|
|
1873
|
-
return t =
|
|
1873
|
+
return t = Ze2(t, o), t;
|
|
1874
1874
|
}, setDateValues({ year: o, month: s, date: u2 } = {}) {
|
|
1875
1875
|
return z2(t, { year: o, month: s, date: u2 });
|
|
1876
1876
|
}, setTimeValues({ hours: o, minutes: s, seconds: u2, milliseconds: c } = {}) {
|
|
@@ -1988,7 +1988,7 @@ ${r}`), g2;
|
|
|
1988
1988
|
}, get weeknr() {
|
|
1989
1989
|
return ne2(t);
|
|
1990
1990
|
}, get weeksInYear() {
|
|
1991
|
-
return
|
|
1991
|
+
return k2(t.year, 31);
|
|
1992
1992
|
}, get year() {
|
|
1993
1993
|
return t.date.year;
|
|
1994
1994
|
}, get zoneDate() {
|
|
@@ -2046,7 +2046,7 @@ ${r}`), g2;
|
|
|
2046
2046
|
return e = p({ locale: e }).locale, { long: [...Array(12).keys()].map((r) => new Date(Date.UTC(1970, r, 1)).toLocaleDateString(e, { timeZone: "Etc/UTC", month: "long" })), short: [...Array(12).keys()].map((r) => new Date(Date.UTC(1970, r, 1)).toLocaleDateString(e, { timeZone: "Etc/UTC", month: "short" })) };
|
|
2047
2047
|
}
|
|
2048
2048
|
function qe2({ year: e, locale: r } = {}) {
|
|
2049
|
-
e =
|
|
2049
|
+
e = w2(e) ? parseInt(e) : (/* @__PURE__ */ new Date()).getFullYear();
|
|
2050
2050
|
let n = { year: e, calendar: {} }, t = Y2().long.map((a) => a.toLowerCase());
|
|
2051
2051
|
for (let a = 0; a < 12; a += 1) {
|
|
2052
2052
|
let o = f.from(e, a, 1);
|
|
@@ -2055,7 +2055,7 @@ ${r}`), g2;
|
|
|
2055
2055
|
return n;
|
|
2056
2056
|
}
|
|
2057
2057
|
function He2({ year: e, monthNr: r, locale: n = "en-CA" } = {}) {
|
|
2058
|
-
e =
|
|
2058
|
+
e = w2(r) && parseInt(e) || -1, r = w2(r) && parseInt(r) || (/* @__PURE__ */ new Date()).getFullYear();
|
|
2059
2059
|
let t = r >= 1 && r <= 12;
|
|
2060
2060
|
return n = p({ locale: n }).locale, r = t ? r - 1 : void 0, t ? f.from(e, r, 1).relocate({ locale: n }).fullMonth(n) : "MonthNr should be a specific number (1 = january - 12 = december)";
|
|
2061
2061
|
}
|
|
@@ -2081,12 +2081,12 @@ ${r}`), g2;
|
|
|
2081
2081
|
return p({ locale: e, timeZone: r, l: n, tz: t }, true);
|
|
2082
2082
|
}
|
|
2083
2083
|
function be2(e) {
|
|
2084
|
-
return !Number.isNaN(+e) && e?.constructor === Date
|
|
2084
|
+
return !Number.isNaN(+e) && e?.constructor === Date ? e : /* @__PURE__ */ new Date();
|
|
2085
2085
|
}
|
|
2086
2086
|
function Ie2(e) {
|
|
2087
2087
|
let r = /* @__PURE__ */ new Date();
|
|
2088
2088
|
switch (true) {
|
|
2089
|
-
case e
|
|
2089
|
+
case (typeof e == "string" || typeof e == "number"):
|
|
2090
2090
|
return be2(new Date(e));
|
|
2091
2091
|
case (Array.isArray(e) && e.map(Number).length === e.length):
|
|
2092
2092
|
return e.length === 1 ? new Date(e[0], 0, 1) : new Date(...e);
|
|
@@ -2108,11 +2108,11 @@ ${r}`), g2;
|
|
|
2108
2108
|
let t = { timeZone: p({ timeZone: r }).timeZone }, a = { timeZone: p({ timeZone: n || "" }).timeZone }, o = f(e, t), s = f(e, a), u2 = s.differenceTo(o), c = o.offsetFrom(s).offset, [l, m] = A2(c, true), T3 = s.clone.add(`${l} hours, ${m} minutes`), y = u2.equalDates ? "No difference" : `Time offset ${c}: ${a.timeZone} is ${u2.clean} ${l < 0 ? "behind" : "ahead of"} ${t.timeZone}`;
|
|
2109
2109
|
return { remoteTimezone: t.timeZone, userTimezone: a.timeZone, timeDifference: y, result: { [t.timeZone.replace(/\//, "_")]: f(e).toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }), [a.timeZone.replace(/\//, "_")]: T3.toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }) } };
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
2111
|
+
function w2(e) {
|
|
2112
2112
|
return !Number.isNaN(parseInt(e));
|
|
2113
2113
|
}
|
|
2114
2114
|
function V2(e, r, n) {
|
|
2115
|
-
return e?.constructor === Number ?
|
|
2115
|
+
return e?.constructor === Number ? Z2(r, `${e} ${n}`) : r;
|
|
2116
2116
|
}
|
|
2117
2117
|
function Ge2(e) {
|
|
2118
2118
|
let r = { addYears(n = 1) {
|
|
@@ -2124,21 +2124,21 @@ ${r}`), g2;
|
|
|
2124
2124
|
}, addDays(n = 1) {
|
|
2125
2125
|
return V2(n, e, "days");
|
|
2126
2126
|
}, get nextYear() {
|
|
2127
|
-
return
|
|
2127
|
+
return Z2(e, "1 year");
|
|
2128
2128
|
}, get nextWeek() {
|
|
2129
|
-
return
|
|
2129
|
+
return Z2(e, "7 days");
|
|
2130
2130
|
}, get previousWeek() {
|
|
2131
|
-
return
|
|
2131
|
+
return Z2(e, "-7 days");
|
|
2132
2132
|
}, get previousYear() {
|
|
2133
|
-
return
|
|
2133
|
+
return Z2(e, "-1 year");
|
|
2134
2134
|
}, get nextMonth() {
|
|
2135
|
-
return
|
|
2135
|
+
return Z2(e, "1 month");
|
|
2136
2136
|
}, get previousMonth() {
|
|
2137
|
-
return
|
|
2137
|
+
return Z2(e, "-1 month");
|
|
2138
2138
|
}, get tomorrow() {
|
|
2139
|
-
return
|
|
2139
|
+
return Z2(e, "1 day");
|
|
2140
2140
|
}, get yesterday() {
|
|
2141
|
-
return
|
|
2141
|
+
return Z2(e, "-1 day");
|
|
2142
2142
|
} };
|
|
2143
2143
|
for (let n of Ve2) r[n.syn] = function(...t) {
|
|
2144
2144
|
return e[n.native](...t), e;
|
|
@@ -2167,11 +2167,11 @@ ${r}`), g2;
|
|
|
2167
2167
|
} }, localMonthnames: { value(n) {
|
|
2168
2168
|
return Y2(n);
|
|
2169
2169
|
} }, daysInMonth: { value(n, t = false) {
|
|
2170
|
-
return n =
|
|
2170
|
+
return n = w2(n) ? parseInt(n) : 0, n >= 1 && n <= 12 ? new Date(t ? 2e3 : 2005, n, 0).getDate() : `${n} should be a Number between (1 (january) - 12 (december))`;
|
|
2171
2171
|
} }, yearCalendar: { value: qe2 }, monthCalendar: { value: He2 }, from: { value(...n) {
|
|
2172
2172
|
return e(n);
|
|
2173
2173
|
} }, fromUxTS: { value(n, t) {
|
|
2174
|
-
n =
|
|
2174
|
+
n = w2(n) ? parseInt(n) * 1e3 : void 0;
|
|
2175
2175
|
let a = n ? new Date(n) : /* @__PURE__ */ new Date();
|
|
2176
2176
|
return f(a, t || g);
|
|
2177
2177
|
} }, hasDST: { value({ date: n, timeZone: t } = {}) {
|
|
@@ -2189,7 +2189,7 @@ ${r}`), g2;
|
|
|
2189
2189
|
} }, addCustom: { value({ name: n, method: t, enumerable: a = false, isGetter: o = false } = {}) {
|
|
2190
2190
|
n?.constructor === String && t?.constructor === Function && t.length > 0 && (r[n] = { method: t, enumerable: a, isGetter: o });
|
|
2191
2191
|
} }, validateLocaleInformation: { value: p }, timeAcrossZones: { value: _e2 }, weeksInYear: { value(n) {
|
|
2192
|
-
return
|
|
2192
|
+
return k2(n, 31);
|
|
2193
2193
|
} }, keys: { get() {
|
|
2194
2194
|
let n = Object.fromEntries(Object.entries(r).filter(([a, o]) => o.enumerable === true));
|
|
2195
2195
|
return [...Object.keys(E()), ...Object.keys(se2()), ...Object.keys(n)].sort((a, o) => a.localeCompare(o));
|