@formkit/tempo 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.mjs +5 -3
- package/dist/bundle.mjs.map +1 -1
- package/dist/common.mjs +4 -2
- package/dist/common.mjs.map +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/yearDays.mjs +1 -1
- package/dist/yearDays.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bundle.mjs
CHANGED
|
@@ -225,7 +225,7 @@ var tokens = /* @__PURE__ */ new Map(
|
|
|
225
225
|
var dayPeriodMap = /* @__PURE__ */ new Map();
|
|
226
226
|
var styles = ["full", "long", "medium", "short"];
|
|
227
227
|
var two = (n) => String(n).padStart(2, "0");
|
|
228
|
-
var four = (n) => String(n).padStart(
|
|
228
|
+
var four = (n) => String(n).padStart(4, "0");
|
|
229
229
|
function normStr(part) {
|
|
230
230
|
if (part.type === "literal") {
|
|
231
231
|
part.value = part.value.normalize("NFKC");
|
|
@@ -270,7 +270,9 @@ function createPartMap(inputDate, parts2, locale, genitive = false) {
|
|
|
270
270
|
const valueParts = [];
|
|
271
271
|
const genitiveParts = [];
|
|
272
272
|
function addValues(requestedParts, hour122 = false) {
|
|
273
|
-
const preciseLocale =
|
|
273
|
+
const preciseLocale = new Intl.Locale(locale, {
|
|
274
|
+
hourCycle: hour122 ? "h12" : "h23"
|
|
275
|
+
}).toString();
|
|
274
276
|
valueParts.push(
|
|
275
277
|
...new Intl.DateTimeFormat(
|
|
276
278
|
preciseLocale,
|
|
@@ -775,7 +777,7 @@ function monthStart(inputDate) {
|
|
|
775
777
|
// src/yearDays.ts
|
|
776
778
|
function yearDays(inputDate) {
|
|
777
779
|
const d = date(inputDate);
|
|
778
|
-
return (
|
|
780
|
+
return (Date.UTC(d.getFullYear() + 1, 0, 0) - Date.UTC(d.getFullYear(), 0, 0)) / 864e5;
|
|
779
781
|
}
|
|
780
782
|
|
|
781
783
|
// src/nearestDay.ts
|