@thi.ng/date 2.5.17 → 2.6.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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-02-10T08:59:56Z
3
+ - **Last updated**: 2024-02-22T11:59:16Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ## [2.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@2.6.0) (2024-02-22)
13
+
14
+ #### 🚀 Features
15
+
16
+ - add FMT_yyyyMMdd_ALT and FMT_HHmmss_ALT formatters ([658bcf9](https://github.com/thi-ng/umbrella/commit/658bcf9))
17
+
12
18
  ## [2.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/date@2.5.0) (2023-11-04)
13
19
 
14
20
  #### 🚀 Features
package/README.md CHANGED
@@ -18,7 +18,7 @@
18
18
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
19
19
 
20
20
  > [!NOTE]
21
- > This is one of 189 standalone projects, maintained as part
21
+ > This is one of 190 standalone projects, maintained as part
22
22
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
23
23
  > and anti-framework.
24
24
  >
@@ -73,7 +73,7 @@ For Node.js REPL:
73
73
  const date = await import("@thi.ng/date");
74
74
  ```
75
75
 
76
- Package sizes (brotli'd, pre-treeshake): ESM: 5.36 KB
76
+ Package sizes (brotli'd, pre-treeshake): ESM: 5.38 KB
77
77
 
78
78
  ## Dependencies
79
79
 
package/format.d.ts CHANGED
@@ -31,6 +31,10 @@ export declare const defFormat: (fmt: (string | FormatFn)[]) => (x?: MaybeDate,
31
31
  * Format preset, e.g. `2020-09-19`
32
32
  */
33
33
  export declare const FMT_yyyyMMdd: (x?: MaybeDate, utc?: boolean) => string;
34
+ /**
35
+ * Format preset, e.g. `20200919`
36
+ */
37
+ export declare const FMT_yyyyMMdd_ALT: (x?: MaybeDate, utc?: boolean) => string;
34
38
  /**
35
39
  * Format preset, e.g. `9/19/2020`
36
40
  */
@@ -60,6 +64,10 @@ export declare const FMT_hm: (x?: MaybeDate, utc?: boolean) => string;
60
64
  * Format preset, e.g. `17:08:01`
61
65
  */
62
66
  export declare const FMT_HHmmss: (x?: MaybeDate, utc?: boolean) => string;
67
+ /**
68
+ * Format preset, e.g. `17:08:01`
69
+ */
70
+ export declare const FMT_HHmmss_ALT: (x?: MaybeDate, utc?: boolean) => string;
63
71
  /**
64
72
  * Format preset, e.g. `5:08:01 PM`
65
73
  */
package/format.js CHANGED
@@ -160,6 +160,7 @@ const defFormat = (fmt) => (x = Date.now(), utc = false) => {
160
160
  }).join("");
161
161
  };
162
162
  const FMT_yyyyMMdd = defFormat(["yyyy", "-", "MM", "-", "dd"]);
163
+ const FMT_yyyyMMdd_ALT = defFormat(["yyyy", "MM", "dd"]);
163
164
  const FMT_Mdyyyy = defFormat(["M", "/", "d", "/", "yyyy"]);
164
165
  const FMT_MMMdyyyy = defFormat(["MMM", " ", "d", " ", "yyyy"]);
165
166
  const FMT_dMyyyy = defFormat(["d", "~", "M", "~", "yyyy"]);
@@ -167,6 +168,7 @@ const FMT_dMMMyyyy = defFormat(["d", "~~", "MMM", " ", "yyyy"]);
167
168
  const FMT_HHmm = defFormat(["HH", ":", "mm"]);
168
169
  const FMT_hm = defFormat(["h", ":", "mm", " ", "A"]);
169
170
  const FMT_HHmmss = defFormat(["HH", ":", "mm", ":", "ss"]);
171
+ const FMT_HHmmss_ALT = defFormat(["HH", "mm", "ss"]);
170
172
  const FMT_hms = defFormat(["h", ":", "mm", ":", "ss", " ", "A"]);
171
173
  const FMT_yyyyMMdd_HHmmss = defFormat(
172
174
  ["yyyy", "MM", "dd", "-", "HH", "mm", "ss"]
@@ -238,6 +240,7 @@ const formatDurationParts = (parts, prec = "s") => {
238
240
  export {
239
241
  FMT_HHmm,
240
242
  FMT_HHmmss,
243
+ FMT_HHmmss_ALT,
241
244
  FMT_ISO,
242
245
  FMT_ISO_SHORT,
243
246
  FMT_MMMdyyyy,
@@ -247,6 +250,7 @@ export {
247
250
  FMT_hm,
248
251
  FMT_hms,
249
252
  FMT_yyyyMMdd,
253
+ FMT_yyyyMMdd_ALT,
250
254
  FMT_yyyyMMdd_HHmmss,
251
255
  FORMATTERS,
252
256
  defFormat,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/date",
3
- "version": "2.5.17",
3
+ "version": "2.6.0",
4
4
  "description": "Datetime types, relative dates, math, iterators, composable formatters, locales",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,9 +35,9 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.9.23",
39
- "@thi.ng/checks": "^3.4.23",
40
- "@thi.ng/strings": "^3.7.14"
38
+ "@thi.ng/api": "^8.9.25",
39
+ "@thi.ng/checks": "^3.5.0",
40
+ "@thi.ng/strings": "^3.7.16"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@microsoft/api-extractor": "^7.40.1",
@@ -132,5 +132,5 @@
132
132
  "thi.ng": {
133
133
  "year": 2020
134
134
  },
135
- "gitHead": "e5e7d5c6ed2eadee7a91d59cbd0c86ce880ab1c5\n"
135
+ "gitHead": "4513a1c703bdbf0f0867f03e547e47692e415fac\n"
136
136
  }