@thi.ng/date 2.5.0 → 2.5.3

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**: 2023-11-04T22:20:11Z
3
+ - **Last updated**: 2023-11-24T09:35:46Z
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.
package/README.md CHANGED
@@ -58,7 +58,7 @@ For Node.js REPL:
58
58
  const date = await import("@thi.ng/date");
59
59
  ```
60
60
 
61
- Package sizes (brotli'd, pre-treeshake): ESM: 5.25 KB
61
+ Package sizes (brotli'd, pre-treeshake): ESM: 5.34 KB
62
62
 
63
63
  ## Dependencies
64
64
 
package/datetime.js CHANGED
@@ -13,6 +13,13 @@ export const dateTime = (epoch, prec) => new DateTime(epoch, prec);
13
13
  * UTC only.
14
14
  */
15
15
  export class DateTime {
16
+ t;
17
+ s;
18
+ m;
19
+ h;
20
+ d;
21
+ M;
22
+ y;
16
23
  constructor(epoch = Date.now(), prec = "t") {
17
24
  const x = ensureDate(epoch);
18
25
  const id = __precisionToID(prec);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/date",
3
- "version": "2.5.0",
3
+ "version": "2.5.3",
4
4
  "description": "Datetime types, relative dates, math, iterators, composable formatters, locales",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -28,23 +28,22 @@
28
28
  "clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc internal i18n",
29
29
  "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
30
  "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && tools:readme",
32
- "doc:stats": "tools:module-stats",
31
+ "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
33
32
  "pub": "yarn npm publish --access public",
34
- "test": "testament test"
33
+ "test": "bun test"
35
34
  },
36
35
  "dependencies": {
37
- "@thi.ng/api": "^8.9.6",
38
- "@thi.ng/checks": "^3.4.6",
39
- "@thi.ng/strings": "^3.6.4"
36
+ "@thi.ng/api": "^8.9.9",
37
+ "@thi.ng/checks": "^3.4.9",
38
+ "@thi.ng/strings": "^3.7.0"
40
39
  },
41
40
  "devDependencies": {
42
- "@microsoft/api-extractor": "^7.38.0",
43
- "@thi.ng/testament": "^0.3.24",
41
+ "@microsoft/api-extractor": "^7.38.3",
42
+ "@thi.ng/testament": "^0.4.2",
44
43
  "rimraf": "^5.0.5",
45
44
  "tools": "^0.0.1",
46
- "typedoc": "^0.25.2",
47
- "typescript": "^5.2.2"
45
+ "typedoc": "^0.25.3",
46
+ "typescript": "^5.3.2"
48
47
  },
49
48
  "keywords": [
50
49
  "datastructure",
@@ -132,5 +131,5 @@
132
131
  "thi.ng": {
133
132
  "year": 2020
134
133
  },
135
- "gitHead": "336bd1bf95825b3c318a3ab49c54451c94aaa883\n"
134
+ "gitHead": "f6de41f4991704fdbbb2899bb430ed4f4f6efab0\n"
136
135
  }
package/relative.js CHANGED
@@ -147,9 +147,9 @@ export const decomposeDifference = (a, b = new Date()) => {
147
147
  abs -= hour;
148
148
  const parts = [
149
149
  Math.sign(dur),
150
- 0,
151
- 0,
152
- 0,
150
+ 0, // year
151
+ 0, // month
152
+ 0, // day
153
153
  hour / HOUR,
154
154
  min / MINUTE,
155
155
  sec / SECOND,