@thi.ng/date 2.4.5 → 2.4.7
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/CHANGELOG.md +1 -1
- package/README.md +6 -6
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -231,8 +231,8 @@ purposes (i.e. as axis tick label generators for
|
|
|
231
231
|
#### Parsing
|
|
232
232
|
|
|
233
233
|
Relative dates can be obtained via
|
|
234
|
-
[`parseRelative()`](https://docs.thi.ng/umbrella/date/
|
|
235
|
-
or [`relative()`](https://docs.thi.ng/umbrella/date/
|
|
234
|
+
[`parseRelative()`](https://docs.thi.ng/umbrella/date/functions/parseRelative.html)
|
|
235
|
+
or [`relative()`](https://docs.thi.ng/umbrella/date/functions/relative.html).
|
|
236
236
|
|
|
237
237
|
```ts
|
|
238
238
|
const now = dateTime();
|
|
@@ -255,9 +255,9 @@ parseRelative("-1 month", now)
|
|
|
255
255
|
#### Formatting
|
|
256
256
|
|
|
257
257
|
Dates can be formatted as relative descriptions using
|
|
258
|
-
[`formatRelative()`](https://docs.thi.ng/umbrella/date/
|
|
258
|
+
[`formatRelative()`](https://docs.thi.ng/umbrella/date/functions/formatRelative.html)
|
|
259
259
|
and
|
|
260
|
-
[`formatRelativeParts()`](https://docs.thi.ng/umbrella/date/
|
|
260
|
+
[`formatRelativeParts()`](https://docs.thi.ng/umbrella/date/functions/formatRelativeParts.html).
|
|
261
261
|
Both functions use the currently active [locale](#locales) and accept an optional
|
|
262
262
|
reference date (default: now).
|
|
263
263
|
|
|
@@ -311,7 +311,7 @@ formatDuration(45296000,"d")
|
|
|
311
311
|
### Date & time formatters
|
|
312
312
|
|
|
313
313
|
Custom date/time formatters can be assembled via
|
|
314
|
-
[`defFormat()`](https://docs.thi.ng/umbrella/date/
|
|
314
|
+
[`defFormat()`](https://docs.thi.ng/umbrella/date/functions/defFormat.html),
|
|
315
315
|
using the following partial format identifiers. The `MMM` and `E` formatters use
|
|
316
316
|
the currently active [locale](#locales). To escape a formatter and use as a
|
|
317
317
|
string literal, prefix the term with `\\`.
|
|
@@ -427,7 +427,7 @@ fmt(dateTime());
|
|
|
427
427
|
// Saturday 19 September 2020
|
|
428
428
|
```
|
|
429
429
|
|
|
430
|
-
Use [`withLocale()`](https://docs.thi.ng/umbrella/date/
|
|
430
|
+
Use [`withLocale()`](https://docs.thi.ng/umbrella/date/functions/withLocale.html)
|
|
431
431
|
to only temporarily set a locale and execute a function with it, then
|
|
432
432
|
automatically restoring the currently active locale.
|
|
433
433
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/date",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.7",
|
|
4
4
|
"description": "Datetime types, relative dates, math, iterators, composable formatters, locales",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.7.
|
|
37
|
+
"@thi.ng/api": "^8.7.3",
|
|
38
38
|
"@thi.ng/checks": "^3.3.9",
|
|
39
|
-
"@thi.ng/strings": "^3.4.
|
|
39
|
+
"@thi.ng/strings": "^3.4.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@microsoft/api-extractor": "^7.34.2",
|
|
43
|
-
"@thi.ng/testament": "^0.3.
|
|
43
|
+
"@thi.ng/testament": "^0.3.12",
|
|
44
44
|
"rimraf": "^4.1.2",
|
|
45
45
|
"tools": "^0.0.1",
|
|
46
46
|
"typedoc": "^0.23.24",
|
|
@@ -132,5 +132,5 @@
|
|
|
132
132
|
"thi.ng": {
|
|
133
133
|
"year": 2020
|
|
134
134
|
},
|
|
135
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "8ab2cbfe2f59b7ef672b6e1cf2a43368f8437ddf\n"
|
|
136
136
|
}
|