@zag-js/i18n-utils
Advanced tools
Comparing version 0.76.0 to 0.77.0
@@ -183,2 +183,3 @@ 'use strict'; | ||
switch (format) { | ||
// era | ||
case "G": | ||
@@ -192,2 +193,3 @@ case "GG": | ||
return date.toLocaleString(locale, { era: "narrow" }); | ||
// year | ||
case "y": | ||
@@ -208,2 +210,3 @@ case "Y": | ||
return date.toLocaleString(locale, { year: "numeric" }).padStart(4, "0"); | ||
// quarter | ||
case "Q": | ||
@@ -222,2 +225,3 @@ case "QQQQQ": | ||
} | ||
// month | ||
case "M": | ||
@@ -235,2 +239,3 @@ return date.getMonth() + 1; | ||
return date.toLocaleString(locale, { month: "narrow" }); | ||
// week | ||
case "w": | ||
@@ -242,2 +247,3 @@ return Math.ceil(date.getDate() / 7); | ||
return pad(Math.ceil(date.getDate() / 7), 2); | ||
// day | ||
case "d": | ||
@@ -254,2 +260,3 @@ case "D": | ||
return pad(date.getDate(), 3); | ||
// weekday | ||
case "E": | ||
@@ -265,2 +272,3 @@ case "EE": | ||
return date.toLocaleString(locale, { weekday: "short" }).slice(0, 2); | ||
// hour | ||
case "h": | ||
@@ -278,2 +286,3 @@ return date.toLocaleString(locale, { hour: "numeric", hour12: true }); | ||
return date.toLocaleString(locale, { hour: "2-digit", hour12: false }); | ||
// minute | ||
case "m": | ||
@@ -285,2 +294,3 @@ return date.toLocaleString(locale, { minute: "numeric" }); | ||
return date.toLocaleString(locale, { minute: "2-digit" }); | ||
// second | ||
case "s": | ||
@@ -292,4 +302,6 @@ return date.toLocaleString(locale, { second: "numeric" }); | ||
return date.toLocaleString(locale, { second: "2-digit" }); | ||
// timestamp | ||
case "T": | ||
return date.getTime(); | ||
// day period | ||
case "a": | ||
@@ -303,2 +315,3 @@ case "aa": | ||
return date.toLocaleString(locale, { hour: "numeric", hour12: true }).charAt(0); | ||
// TODO:Revise this | ||
case "z": | ||
@@ -305,0 +318,0 @@ case "zz": |
{ | ||
"name": "@zag-js/i18n-utils", | ||
"version": "0.76.0", | ||
"version": "0.77.0", | ||
"description": "Interationalization utilities for Zag.js", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/dom-query": "0.76.0" | ||
"@zag-js/dom-query": "0.77.0" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
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
31307
904
+ Added@zag-js/dom-query@0.77.0(transitive)
- Removed@zag-js/dom-query@0.76.0(transitive)
Updated@zag-js/dom-query@0.77.0