@zag-js/i18n-utils
Advanced tools
Comparing version 0.65.1 to 0.66.0
@@ -168,2 +168,3 @@ "use strict"; | ||
switch (format) { | ||
// era | ||
case "G": | ||
@@ -177,2 +178,3 @@ case "GG": | ||
return date.toLocaleString(locale, { era: "narrow" }); | ||
// year | ||
case "y": | ||
@@ -193,2 +195,3 @@ case "Y": | ||
return date.toLocaleString(locale, { year: "numeric" }).padStart(4, "0"); | ||
// quarter | ||
case "Q": | ||
@@ -207,2 +210,3 @@ case "QQQQQ": | ||
} | ||
// month | ||
case "M": | ||
@@ -220,2 +224,3 @@ return date.getMonth() + 1; | ||
return date.toLocaleString(locale, { month: "narrow" }); | ||
// week | ||
case "w": | ||
@@ -227,2 +232,3 @@ return Math.ceil(date.getDate() / 7); | ||
return pad(Math.ceil(date.getDate() / 7), 2); | ||
// day | ||
case "d": | ||
@@ -239,2 +245,3 @@ case "D": | ||
return pad(date.getDate(), 3); | ||
// weekday | ||
case "E": | ||
@@ -250,2 +257,3 @@ case "EE": | ||
return date.toLocaleString(locale, { weekday: "short" }).slice(0, 2); | ||
// hour | ||
case "h": | ||
@@ -263,2 +271,3 @@ return date.toLocaleString(locale, { hour: "numeric", hour12: true }); | ||
return date.toLocaleString(locale, { hour: "2-digit", hour12: false }); | ||
// minute | ||
case "m": | ||
@@ -270,2 +279,3 @@ return date.toLocaleString(locale, { minute: "numeric" }); | ||
return date.toLocaleString(locale, { minute: "2-digit" }); | ||
// second | ||
case "s": | ||
@@ -277,4 +287,6 @@ return date.toLocaleString(locale, { second: "numeric" }); | ||
return date.toLocaleString(locale, { second: "2-digit" }); | ||
// timestamp | ||
case "T": | ||
return date.getTime(); | ||
// day period | ||
case "a": | ||
@@ -288,2 +300,3 @@ case "aa": | ||
return date.toLocaleString(locale, { hour: "numeric", hour12: true }).charAt(0); | ||
// TODO:Revise this | ||
case "z": | ||
@@ -290,0 +303,0 @@ case "zz": |
{ | ||
"name": "@zag-js/i18n-utils", | ||
"version": "0.65.1", | ||
"version": "0.66.0", | ||
"description": "Interationalization utilities for Zag.js", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/dom-query": "0.65.1" | ||
"@zag-js/dom-query": "0.66.0" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
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
74284
862
+ Added@zag-js/dom-query@0.66.0(transitive)
- Removed@zag-js/dom-query@0.65.1(transitive)
Updated@zag-js/dom-query@0.66.0