@ews-admin/global-design-system 1.11.0 → 1.12.0
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/index.d.ts +5 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +3 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -8
- package/dist/index.js.map +1 -1
- package/dist/utils/index.d.ts +4 -7
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/utils/index.ts +8 -9
package/dist/index.js
CHANGED
|
@@ -155,19 +155,14 @@ function formatCurrency(amount, currency = CURRENCY) {
|
|
|
155
155
|
currency,
|
|
156
156
|
}).format(amount);
|
|
157
157
|
}
|
|
158
|
-
/**
|
|
159
|
-
* Utility function to format date
|
|
160
|
-
* @param date - Date to format
|
|
161
|
-
* @param options - Intl.DateTimeFormat options
|
|
162
|
-
* @returns Formatted date string
|
|
163
|
-
*/
|
|
164
158
|
function formatDate(date, options) {
|
|
159
|
+
const { locale = "en-US", ...intlOptions } = options ?? {};
|
|
165
160
|
const dateObj = new Date(date);
|
|
166
|
-
return new Intl.DateTimeFormat(
|
|
161
|
+
return new Intl.DateTimeFormat(locale, {
|
|
167
162
|
year: "numeric",
|
|
168
163
|
month: "long",
|
|
169
164
|
day: "numeric",
|
|
170
|
-
...
|
|
165
|
+
...intlOptions,
|
|
171
166
|
}).format(dateObj);
|
|
172
167
|
}
|
|
173
168
|
/**
|