format-temporal 0.0.1 → 0.1.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/README.md +2 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
A formatting function for [Temporal](https://www.npmjs.com/package/temporal-spec) types.
|
|
6
6
|
|
|
7
|
+
## Motivation
|
|
8
|
+
|
|
7
9
|
Several Temporal types don't support the `toLocaleString` method (i.e., `Temporal.ZonedDateTime`, `Temporal.PlainYearMonth`, and `Temporal.PlainMonthDay`), so this package provides a `formatTemporal` function that formats a Temporal type using the `Intl.DateTimeFormat` API.
|
|
8
10
|
|
|
9
11
|
## Usage
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "format-temporal",
|
|
3
3
|
"description": "Format Temporal objects as localized strings.",
|
|
4
4
|
"author": "Ian Macalinao <me@ianm.com>",
|
|
5
|
-
"version": "0.0
|
|
5
|
+
"version": "0.1.0",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"sideEffects": false,
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"tslib": "^2.8.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@macalinao/eslint-config": "^4.
|
|
28
|
-
"@macalinao/tsconfig": "^3.
|
|
29
|
-
"eslint": "^9.
|
|
27
|
+
"@macalinao/eslint-config": "^4.1.2",
|
|
28
|
+
"@macalinao/tsconfig": "^3.1.0",
|
|
29
|
+
"eslint": "^9.18.0",
|
|
30
30
|
"temporal-polyfill": "^0.2.5",
|
|
31
31
|
"temporal-spec": "^0.2.4",
|
|
32
|
-
"typescript": "^5.7.
|
|
33
|
-
"vitest": "^
|
|
32
|
+
"typescript": "^5.7.3",
|
|
33
|
+
"vitest": "^3.0.3"
|
|
34
34
|
},
|
|
35
35
|
"main": "dist/index.js",
|
|
36
36
|
"types": "dist/index.d.ts",
|