@thi.ng/date 2.7.83 → 2.8.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 -1
- package/api.d.ts +6 -0
- package/datetime.d.ts +1 -1
- package/format.js +10 -6
- package/i18n/en.js +0 -1
- package/i18n.js +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ For Node.js REPL:
|
|
|
69
69
|
const date = await import("@thi.ng/date");
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 5.
|
|
72
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 5.43 KB
|
|
73
73
|
|
|
74
74
|
## Dependencies
|
|
75
75
|
|
|
@@ -381,6 +381,7 @@ string literal, prefix the term with `\\`.
|
|
|
381
381
|
| `/DM` | Locale-specific day-month separator |
|
|
382
382
|
| `/MY` | Locale-specific month-year separator |
|
|
383
383
|
| `/HM` | Locale-specific hour-minute separator |
|
|
384
|
+
| `/MS` | Locale-specific minute-second separator |
|
|
384
385
|
|
|
385
386
|
<small>(Format IDs somewhat based on Java's
|
|
386
387
|
[SimpleDateFormat](https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/text/SimpleDateFormat.html))</small>
|
package/api.d.ts
CHANGED
package/datetime.d.ts
CHANGED
|
@@ -118,5 +118,5 @@ export declare const ensureDateTime: (x: MaybeDate, prec?: Precision) => DateTim
|
|
|
118
118
|
*
|
|
119
119
|
* @param x -
|
|
120
120
|
*/
|
|
121
|
-
export declare const maybeIsDate: (x: any) => x is string | number |
|
|
121
|
+
export declare const maybeIsDate: (x: any) => x is string | number | Date | DateTime;
|
|
122
122
|
//# sourceMappingURL=datetime.d.ts.map
|
package/format.js
CHANGED
|
@@ -146,6 +146,10 @@ const FORMATTERS = {
|
|
|
146
146
|
* Current {@link LOCALE}'s hour-minute separator.
|
|
147
147
|
*/
|
|
148
148
|
"/HM": () => LOCALE.sepHM,
|
|
149
|
+
/**
|
|
150
|
+
* Current {@link LOCALE}'s minute-second separator.
|
|
151
|
+
*/
|
|
152
|
+
"/MS": () => LOCALE.sepMS,
|
|
149
153
|
/**
|
|
150
154
|
* Current {@link LOCALE}'s month-year separator.
|
|
151
155
|
*/
|
|
@@ -162,13 +166,13 @@ const FMT_yyyyMMdd = defFormat(["yyyy", "-", "MM", "-", "dd"]);
|
|
|
162
166
|
const FMT_yyyyMMdd_ALT = defFormat(["yyyy", "MM", "dd"]);
|
|
163
167
|
const FMT_Mdyyyy = defFormat(["M", "/", "d", "/", "yyyy"]);
|
|
164
168
|
const FMT_MMMdyyyy = defFormat(["MMM", " ", "d", " ", "yyyy"]);
|
|
165
|
-
const FMT_dMyyyy = defFormat(["d", "
|
|
166
|
-
const FMT_dMMMyyyy = defFormat(["d", "
|
|
167
|
-
const FMT_HHmm = defFormat(["HH", "
|
|
168
|
-
const FMT_hm = defFormat(["h", "
|
|
169
|
-
const FMT_HHmmss = defFormat(["HH", "
|
|
169
|
+
const FMT_dMyyyy = defFormat(["d", "/DM", "M", "/MY", "yyyy"]);
|
|
170
|
+
const FMT_dMMMyyyy = defFormat(["d", "/DM", "MMM", " ", "yyyy"]);
|
|
171
|
+
const FMT_HHmm = defFormat(["HH", "/HM", "mm"]);
|
|
172
|
+
const FMT_hm = defFormat(["h", "/HM", "mm", " ", "A"]);
|
|
173
|
+
const FMT_HHmmss = defFormat(["HH", "/HM", "mm", "/MS", "ss"]);
|
|
170
174
|
const FMT_HHmmss_ALT = defFormat(["HH", "mm", "ss"]);
|
|
171
|
-
const FMT_hms = defFormat(["h", "
|
|
175
|
+
const FMT_hms = defFormat(["h", "/HM", "mm", "/MS", "ss", " ", "A"]);
|
|
172
176
|
const FMT_yyyyMMdd_HHmmss = defFormat(
|
|
173
177
|
["yyyy", "MM", "dd", "-", "HH", "mm", "ss"]
|
|
174
178
|
);
|
package/i18n/en.js
CHANGED
package/i18n.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/date",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Datetime types, relative dates, math, iterators, composable formatters, locales",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -135,5 +135,5 @@
|
|
|
135
135
|
"thi.ng": {
|
|
136
136
|
"year": 2020
|
|
137
137
|
},
|
|
138
|
-
"gitHead": "
|
|
138
|
+
"gitHead": "4924437d79b0a602593f972b6537d8eba3e0b2ee\n"
|
|
139
139
|
}
|