datetick 1.0.0 → 1.0.1

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Andreas Nicolaou
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Andreas Nicolaou
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,118 +1,118 @@
1
- <h1 align="center">DateTick</h1>
2
-
3
- <p align="center">Tiny, <b>immutable</b>, fully <b>timezone-aware</b> date toolkit for JavaScript &amp; TypeScript — with the same ergonomic, chainable API you already know.</p>
4
-
5
- <p align="center">
6
- <a href="https://www.npmjs.com/package/datetick"><img src="https://img.shields.io/npm/v/datetick.svg?style=flat-square&colorB=51C838" alt="NPM Version"></a>
7
- <a href="https://bundlephobia.com/package/datetick"><img src="https://img.shields.io/bundlephobia/minzip/datetick?style=flat-square&color=45cc11" alt="Gzip Size"></a>
8
- </p>
9
-
10
- ![TypeScript](https://img.shields.io/badge/TS-TypeScript-3178c6?logo=typescript&logoColor=white)
11
- ![GitHub contributors](https://img.shields.io/github/contributors/andreasnicolaou/datetick)
12
- ![GitHub License](https://img.shields.io/github/license/andreasnicolaou/datetick)
13
- ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/andreasnicolaou/datetick/build.yaml)
14
- ![GitHub package.json version](https://img.shields.io/github/package-json/v/andreasnicolaou/datetick)
15
- [![Known Vulnerabilities](https://snyk.io/test/github/andreasnicolaou/datetick/badge.svg)](https://snyk.io/test/github/andreasnicolaou/datetick)
16
- ![Bundle Size](https://deno.bundlejs.com/badge?q=datetick&treeshake=[*])
17
-
18
- ![ESLint](https://img.shields.io/badge/linter-eslint-4B32C3.svg?logo=eslint)
19
- ![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?logo=prettier)
20
- ![Jest](https://img.shields.io/badge/tested_with-jest-99424f.svg?logo=jest)
21
- ![Maintenance](https://img.shields.io/maintenance/yes/2026)
22
- [![codecov](https://codecov.io/gh/andreasnicolaou/datetick/graph/badge.svg)](https://codecov.io/gh/andreasnicolaou/datetick)
23
- [![Socket Badge](https://badge.socket.dev/npm/package/datetick)](https://badge.socket.dev/npm/package/datetick)
24
-
25
- ![NPM Downloads](https://img.shields.io/npm/dm/datetick)
26
-
27
- <p align="center"><b><a href="https://andreasnicolaou.github.io/datetick/">🚀 Live demo &amp; interactive playground</a></b></p>
28
-
29
- ---
30
-
31
- > DateTick parses, validates, manipulates, formats and compares dates and times — with **every** calendar operation resolved through a real IANA timezone, so one absolute instant is always interpreted consistently in one zone (DST included). Zero runtime dependencies. Works the same in vanilla JS, Angular, React, Vue and Node.
32
-
33
- ```ts
34
- import datetick from 'datetick';
35
-
36
- datetick('2026-06-25T19:23Z', { timezone: 'Asia/Tokyo' }).formatPattern('DD/MM/YYYY HH:mm'); // '26/06/2026 04:23'
37
-
38
- datetick('2026-06-25').startOf('month').add(1, 'day').set('year', 2027).format('long');
39
-
40
- datetick.duration(90, 'minute').humanize(); // '2 hours'
41
- datetick('2026-06-25').timeAgoLive().subscribe(console.log); // live "time ago" stream
42
- ```
43
-
44
- - 🌐 **Fully timezone-aware** — reading components, `add`/`subtract`, `startOf`/`endOf`, weeks and formatting all resolve through the configured IANA timezone
45
- - 💪 **Immutable & chainable** — every method returns a new instance; safe to share across Angular components, React renders and Vue computeds
46
- - 📦 **Zero runtime dependencies** — locales come from the platform's `Intl`, so there are no locale files to import
47
- - 🕒 **Familiar API** — Day.js-style tokens, getters/setters, comparisons and relative time
48
- - ⏳ **Durations & live "time ago"** — ISO 8601 durations, `humanize()`, and a dependency-free live relative-time stream
49
- - 🗓️ **Calendar-grid data** — ready-to-render month grids for building date pickers
50
- - 🔒 **TypeScript-first** — full types shipped, ESM + UMD builds
51
-
52
- ## Getting Started
53
-
54
- ### Installation
55
-
56
- ```bash
57
- npm install datetick
58
- ```
59
-
60
- ### Live demo & documentation
61
-
62
- The full API reference — getters/setters, manipulation, comparisons, formatting/parsing tokens, durations, calendar-grid data, app-wide locale defaults, and copy-paste **Angular / React / Vue** integration (including a runtime language switcher) — plus a live in-browser playground, is hosted on GitHub Pages:
63
-
64
- **➡️ [andreasnicolaou.github.io/datetick](https://andreasnicolaou.github.io/datetick/)**
65
-
66
- You can also open [`docs/index.html`](./docs/index.html) directly in a browser — no build step required.
67
-
68
- ### API
69
-
70
- It's easy to use DateTick to parse, validate, manipulate and display dates and times.
71
-
72
- ```ts
73
- datetick('2026-08-08'); // parse
74
-
75
- datetick().format('YYYY-MM-DD HH:mm:ss'); // display (token pattern)
76
- datetick().format('long'); // display (Intl preset)
77
-
78
- datetick().set('month', 3).month(); // get & set
79
-
80
- datetick().add(1, 'year').subtract(3, 'day'); // manipulate
81
-
82
- datetick().isBefore(datetick()); // query
83
- datetick('2026-06-25').isBetween('2026-06-01', '2026-07-01', '[)');
84
- ```
85
-
86
- ### Timezones
87
-
88
- Every operation is resolved through the configured timezone, so the same instant is interpreted consistently — across DST transitions too.
89
-
90
- ```ts
91
- const t = datetick('2026-06-25T19:23Z', { timezone: 'Asia/Tokyo' });
92
- t.hour(); // 4 (wall-clock hour in Tokyo)
93
- t.utc().hour(); // 19 (same instant, UTC)
94
- t.utcOffset(); // 540
95
- ```
96
-
97
- ### Locale-aware, without locale files
98
-
99
- Locales resolve through the platform's `Intl`, so nothing extra needs to be imported.
100
-
101
- ```ts
102
- datetick('2026-06-25', { locale: 'fr' }).format('long'); // French
103
- datetick('2026-06-25', { locale: 'fr' }).localeData().months()[0]; // 'janvier'
104
- ```
105
-
106
- ### App-wide defaults
107
-
108
- Bind locale / timezone / week start once and reuse the scoped factory — no global mutation.
109
-
110
- ```ts
111
- const paris = datetick.withDefaults({ locale: 'fr', timezone: 'Europe/Paris' });
112
- paris('2026-06-25').format('long'); // French, Paris
113
- datetick('2026-06-25').format('long'); // unaffected
114
- ```
115
-
116
- ## License
117
-
118
- DateTick is licensed under the [MIT License](./LICENSE) © Andreas Nicolaou.
1
+ <h1 align="center">DateTick</h1>
2
+
3
+ <p align="center">Tiny, <b>immutable</b>, fully <b>timezone-aware</b> date toolkit for JavaScript &amp; TypeScript — with the same ergonomic, chainable API you already know.</p>
4
+
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/datetick"><img src="https://img.shields.io/npm/v/datetick.svg?style=flat-square&colorB=51C838" alt="NPM Version"></a>
7
+ <a href="https://bundlephobia.com/package/datetick"><img src="https://img.shields.io/bundlephobia/minzip/datetick?style=flat-square&color=45cc11" alt="Gzip Size"></a>
8
+ </p>
9
+
10
+ ![TypeScript](https://img.shields.io/badge/TS-TypeScript-3178c6?logo=typescript&logoColor=white)
11
+ ![GitHub contributors](https://img.shields.io/github/contributors/andreasnicolaou/datetick)
12
+ ![GitHub License](https://img.shields.io/github/license/andreasnicolaou/datetick)
13
+ ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/andreasnicolaou/datetick/build.yaml)
14
+ ![GitHub package.json version](https://img.shields.io/github/package-json/v/andreasnicolaou/datetick)
15
+ [![Known Vulnerabilities](https://snyk.io/test/github/andreasnicolaou/datetick/badge.svg)](https://snyk.io/test/github/andreasnicolaou/datetick)
16
+ ![Bundle Size](https://deno.bundlejs.com/badge?q=datetick&treeshake=[*])
17
+
18
+ ![ESLint](https://img.shields.io/badge/linter-eslint-4B32C3.svg?logo=eslint)
19
+ ![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?logo=prettier)
20
+ ![Jest](https://img.shields.io/badge/tested_with-jest-99424f.svg?logo=jest)
21
+ ![Maintenance](https://img.shields.io/maintenance/yes/2026)
22
+ [![codecov](https://codecov.io/gh/andreasnicolaou/datetick/graph/badge.svg)](https://codecov.io/gh/andreasnicolaou/datetick)
23
+ [![Socket Badge](https://badge.socket.dev/npm/package/datetick)](https://badge.socket.dev/npm/package/datetick)
24
+
25
+ ![NPM Downloads](https://img.shields.io/npm/dm/datetick)
26
+
27
+ <p align="center"><b><a href="https://andreasnicolaou.github.io/datetick/">🚀 Live demo &amp; interactive playground</a></b></p>
28
+
29
+ ---
30
+
31
+ > DateTick parses, validates, manipulates, formats and compares dates and times — with **every** calendar operation resolved through a real IANA timezone, so one absolute instant is always interpreted consistently in one zone (DST included). Zero runtime dependencies. Works the same in vanilla JS, Angular, React, Vue and Node.
32
+
33
+ ```ts
34
+ import datetick from 'datetick';
35
+
36
+ datetick('2026-06-25T19:23Z', { timezone: 'Asia/Tokyo' }).formatPattern('DD/MM/YYYY HH:mm'); // '26/06/2026 04:23'
37
+
38
+ datetick('2026-06-25').startOf('month').add(1, 'day').set('year', 2027).format('long');
39
+
40
+ datetick.duration(90, 'minute').humanize(); // '2 hours'
41
+ datetick('2026-06-25').timeAgoLive().subscribe(console.log); // live "time ago" stream
42
+ ```
43
+
44
+ - 🌐 **Fully timezone-aware** — reading components, `add`/`subtract`, `startOf`/`endOf`, weeks and formatting all resolve through the configured IANA timezone
45
+ - 💪 **Immutable & chainable** — every method returns a new instance; safe to share across Angular components, React renders and Vue computeds
46
+ - 📦 **Zero runtime dependencies** — locales come from the platform's `Intl`, so there are no locale files to import
47
+ - 🕒 **Familiar API** — Day.js-style tokens, getters/setters, comparisons and relative time
48
+ - ⏳ **Durations & live "time ago"** — ISO 8601 durations, `humanize()`, and a dependency-free live relative-time stream
49
+ - 🗓️ **Calendar-grid data** — ready-to-render month grids for building date pickers
50
+ - 🔒 **TypeScript-first** — full types shipped, ESM + UMD builds
51
+
52
+ ## Getting Started
53
+
54
+ ### Installation
55
+
56
+ ```bash
57
+ npm install datetick
58
+ ```
59
+
60
+ ### Live demo & documentation
61
+
62
+ The full API reference — getters/setters, manipulation, comparisons, formatting/parsing tokens, durations, calendar-grid data, app-wide locale defaults, and copy-paste **Angular / React / Vue** integration (including a runtime language switcher) — plus a live in-browser playground, is hosted on GitHub Pages:
63
+
64
+ **➡️ [andreasnicolaou.github.io/datetick](https://andreasnicolaou.github.io/datetick/)**
65
+
66
+ You can also open [`docs/index.html`](./docs/index.html) directly in a browser — no build step required.
67
+
68
+ ### API
69
+
70
+ It's easy to use DateTick to parse, validate, manipulate and display dates and times.
71
+
72
+ ```ts
73
+ datetick('2026-08-08'); // parse
74
+
75
+ datetick().format('YYYY-MM-DD HH:mm:ss'); // display (token pattern)
76
+ datetick().format('long'); // display (Intl preset)
77
+
78
+ datetick().set('month', 3).month(); // get & set
79
+
80
+ datetick().add(1, 'year').subtract(3, 'day'); // manipulate
81
+
82
+ datetick().isBefore(datetick()); // query
83
+ datetick('2026-06-25').isBetween('2026-06-01', '2026-07-01', '[)');
84
+ ```
85
+
86
+ ### Timezones
87
+
88
+ Every operation is resolved through the configured timezone, so the same instant is interpreted consistently — across DST transitions too.
89
+
90
+ ```ts
91
+ const t = datetick('2026-06-25T19:23Z', { timezone: 'Asia/Tokyo' });
92
+ t.hour(); // 4 (wall-clock hour in Tokyo)
93
+ t.utc().hour(); // 19 (same instant, UTC)
94
+ t.utcOffset(); // 540
95
+ ```
96
+
97
+ ### Locale-aware, without locale files
98
+
99
+ Locales resolve through the platform's `Intl`, so nothing extra needs to be imported.
100
+
101
+ ```ts
102
+ datetick('2026-06-25', { locale: 'fr' }).format('long'); // French
103
+ datetick('2026-06-25', { locale: 'fr' }).localeData().months()[0]; // 'janvier'
104
+ ```
105
+
106
+ ### App-wide defaults
107
+
108
+ Bind locale / timezone / week start once and reuse the scoped factory — no global mutation.
109
+
110
+ ```ts
111
+ const paris = datetick.withDefaults({ locale: 'fr', timezone: 'Europe/Paris' });
112
+ paris('2026-06-25').format('long'); // French, Paris
113
+ datetick('2026-06-25').format('long'); // unaffected
114
+ ```
115
+
116
+ ## License
117
+
118
+ DateTick is licensed under the [MIT License](./LICENSE) © Andreas Nicolaou.
package/package.json CHANGED
@@ -1,145 +1,148 @@
1
- {
2
- "name": "datetick",
3
- "version": "1.0.0",
4
- "description": "DateTick — a tiny, immutable, fully timezone-aware date toolkit: formatting, parsing, durations and live relative-time, for any framework.",
5
- "sideEffects": false,
6
- "main": "dist/index.js",
7
- "module": "dist/index.js",
8
- "browser": "dist/index.umd.min.js",
9
- "private": false,
10
- "types": "dist/index.d.ts",
11
- "type": "module",
12
- "exports": {
13
- ".": {
14
- "import": {
15
- "types": "./dist/index.d.ts",
16
- "default": "./dist/index.js"
17
- },
18
- "browser": "./dist/index.umd.min.js",
19
- "types": "./dist/index.d.ts"
20
- }
21
- },
22
- "scripts": {
23
- "build": "rollup -c",
24
- "format": "prettier --write .",
25
- "format:check": "prettier --check .",
26
- "lint": "eslint --fix",
27
- "test": "cross-env TZ=UTC jest",
28
- "test:ci": "cross-env TZ=UTC JEST_JUNIT_CLASSNAME=\"{filepath}\" jest --reporters=default --reporters=jest-junit",
29
- "test:watch": "cross-env TZ=UTC jest --watch",
30
- "test:coverage": "cross-env TZ=UTC jest --coverage",
31
- "test:bundle": "npx bundlewatch",
32
- "prepublishOnly": "npm run build",
33
- "prepare": "husky"
34
- },
35
- "repository": {
36
- "type": "git",
37
- "url": "https://github.com/andreasnicolaou/datetick.git"
38
- },
39
- "bugs": {
40
- "url": "https://github.com/andreasnicolaou/datetick/issues"
41
- },
42
- "homepage": "https://andreasnicolaou.github.io/datetick/",
43
- "author": {
44
- "name": "Andreas Nicolaou",
45
- "email": "anicolaou66@gmail.com"
46
- },
47
- "license": "MIT",
48
- "jest": {
49
- "transform": {
50
- "^.+\\.(ts)$": [
51
- "ts-jest"
52
- ]
53
- },
54
- "testEnvironment": "jsdom",
55
- "testPathIgnorePatterns": [
56
- "/node_modules/",
57
- "/dist/"
58
- ]
59
- },
60
- "bundlewatch": {
61
- "files": [
62
- {
63
- "path": "dist/index.js",
64
- "maxSize": "20kB",
65
- "compression": "gzip"
66
- },
67
- {
68
- "path": "dist/index.umd.js",
69
- "maxSize": "25kB",
70
- "compression": "gzip"
71
- },
72
- {
73
- "path": "dist/index.umd.min.js",
74
- "maxSize": "10kB",
75
- "compression": "gzip"
76
- }
77
- ]
78
- },
79
- "lint-staged": {
80
- "*.{ts,js,mjs,cjs}": [
81
- "eslint --fix",
82
- "prettier --write"
83
- ],
84
- "*.{json,md,yml,yaml,html,css}": [
85
- "prettier --write"
86
- ]
87
- },
88
- "devDependencies": {
89
- "@commitlint/cli": "^21.2.0",
90
- "@commitlint/config-conventional": "^21.2.0",
91
- "@eslint/eslintrc": "^3.3.5",
92
- "@eslint/js": "^10.0.1",
93
- "@rollup/plugin-commonjs": "^29.0.3",
94
- "@rollup/plugin-node-resolve": "^16.0.3",
95
- "@rollup/plugin-terser": "^1.0.0",
96
- "@rollup/plugin-typescript": "^12.3.0",
97
- "@types/jest": "^30.0.0",
98
- "@types/node": "^26.1.0",
99
- "@typescript-eslint/eslint-plugin": "^8.62.1",
100
- "@typescript-eslint/parser": "^8.62.1",
101
- "bundlewatch": "^0.4.2",
102
- "cross-env": "^10.1.0",
103
- "eslint": "^10.6.0",
104
- "eslint-config-prettier": "^10.1.8",
105
- "eslint-plugin-prettier": "^5.5.6",
106
- "globals": "^17.7.0",
107
- "husky": "^9.1.7",
108
- "jest": "^30.4.2",
109
- "jest-environment-jsdom": "^30.4.1",
110
- "jest-junit": "^17.0.0",
111
- "lint-staged": "^17.0.8",
112
- "prettier": "3.9.4",
113
- "rollup": "^4.62.2",
114
- "rollup-plugin-dts": "^6.4.1",
115
- "ts-jest": "^29.4.11",
116
- "ts-node": "^10.9.2",
117
- "tslib": "^2.8.1",
118
- "typescript": "^6.0.3"
119
- },
120
- "overrides": {
121
- "axios": "^1.18.1",
122
- "js-yaml": "^4.2.0",
123
- "serialize-javascript": "^7.0.6"
124
- },
125
- "keywords": [
126
- "datetick",
127
- "date",
128
- "datetime",
129
- "time",
130
- "timezone",
131
- "format",
132
- "parse",
133
- "duration",
134
- "timeago",
135
- "relative-time",
136
- "immutable",
137
- "reactive",
138
- "framework-agnostic",
139
- "angular",
140
- "react",
141
- "vue",
142
- "typescript",
143
- "andreasnicolaou"
144
- ]
145
- }
1
+ {
2
+ "name": "datetick",
3
+ "version": "1.0.1",
4
+ "description": "DateTick — a tiny, immutable, fully timezone-aware date toolkit: formatting, parsing, durations and live relative-time, for any framework.",
5
+ "sideEffects": false,
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.js",
8
+ "browser": "dist/index.umd.min.js",
9
+ "private": false,
10
+ "types": "dist/index.d.ts",
11
+ "type": "module",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "exports": {
16
+ ".": {
17
+ "import": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ },
21
+ "browser": "./dist/index.umd.min.js",
22
+ "types": "./dist/index.d.ts"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "build": "rollup -c",
27
+ "format": "prettier --write .",
28
+ "format:check": "prettier --check .",
29
+ "lint": "eslint --fix",
30
+ "test": "cross-env TZ=UTC jest",
31
+ "test:ci": "cross-env TZ=UTC JEST_JUNIT_CLASSNAME=\"{filepath}\" jest --reporters=default --reporters=jest-junit",
32
+ "test:watch": "cross-env TZ=UTC jest --watch",
33
+ "test:coverage": "cross-env TZ=UTC jest --coverage",
34
+ "test:bundle": "npx bundlewatch",
35
+ "prepublishOnly": "npm run build",
36
+ "prepare": "husky"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/andreasnicolaou/datetick.git"
41
+ },
42
+ "bugs": {
43
+ "url": "https://github.com/andreasnicolaou/datetick/issues"
44
+ },
45
+ "homepage": "https://andreasnicolaou.github.io/datetick/",
46
+ "author": {
47
+ "name": "Andreas Nicolaou",
48
+ "email": "anicolaou66@gmail.com"
49
+ },
50
+ "license": "MIT",
51
+ "jest": {
52
+ "transform": {
53
+ "^.+\\.(ts)$": [
54
+ "ts-jest"
55
+ ]
56
+ },
57
+ "testEnvironment": "jsdom",
58
+ "testPathIgnorePatterns": [
59
+ "/node_modules/",
60
+ "/dist/"
61
+ ]
62
+ },
63
+ "bundlewatch": {
64
+ "files": [
65
+ {
66
+ "path": "dist/index.js",
67
+ "maxSize": "20kB",
68
+ "compression": "gzip"
69
+ },
70
+ {
71
+ "path": "dist/index.umd.js",
72
+ "maxSize": "25kB",
73
+ "compression": "gzip"
74
+ },
75
+ {
76
+ "path": "dist/index.umd.min.js",
77
+ "maxSize": "10kB",
78
+ "compression": "gzip"
79
+ }
80
+ ]
81
+ },
82
+ "lint-staged": {
83
+ "*.{ts,js,mjs,cjs}": [
84
+ "eslint --fix",
85
+ "prettier --write"
86
+ ],
87
+ "*.{json,md,yml,yaml,html,css}": [
88
+ "prettier --write"
89
+ ]
90
+ },
91
+ "devDependencies": {
92
+ "@commitlint/cli": "^21.2.0",
93
+ "@commitlint/config-conventional": "^21.2.0",
94
+ "@eslint/eslintrc": "^3.3.5",
95
+ "@eslint/js": "^10.0.1",
96
+ "@rollup/plugin-commonjs": "^29.0.3",
97
+ "@rollup/plugin-node-resolve": "^16.0.3",
98
+ "@rollup/plugin-terser": "^1.0.0",
99
+ "@rollup/plugin-typescript": "^12.3.0",
100
+ "@types/jest": "^30.0.0",
101
+ "@types/node": "^26.1.0",
102
+ "@typescript-eslint/eslint-plugin": "^8.62.1",
103
+ "@typescript-eslint/parser": "^8.62.1",
104
+ "bundlewatch": "^0.4.2",
105
+ "cross-env": "^10.1.0",
106
+ "eslint": "^10.6.0",
107
+ "eslint-config-prettier": "^10.1.8",
108
+ "eslint-plugin-prettier": "^5.5.6",
109
+ "globals": "^17.7.0",
110
+ "husky": "^9.1.7",
111
+ "jest": "^30.4.2",
112
+ "jest-environment-jsdom": "^30.4.1",
113
+ "jest-junit": "^17.0.0",
114
+ "lint-staged": "^17.0.8",
115
+ "prettier": "3.9.4",
116
+ "rollup": "^4.62.2",
117
+ "rollup-plugin-dts": "^6.4.1",
118
+ "ts-jest": "^29.4.11",
119
+ "ts-node": "^10.9.2",
120
+ "tslib": "^2.8.1",
121
+ "typescript": "^6.0.3"
122
+ },
123
+ "overrides": {
124
+ "axios": "^1.18.1",
125
+ "js-yaml": "^4.2.0",
126
+ "serialize-javascript": "^7.0.6"
127
+ },
128
+ "keywords": [
129
+ "datetick",
130
+ "date",
131
+ "datetime",
132
+ "time",
133
+ "timezone",
134
+ "format",
135
+ "parse",
136
+ "duration",
137
+ "timeago",
138
+ "relative-time",
139
+ "immutable",
140
+ "reactive",
141
+ "framework-agnostic",
142
+ "angular",
143
+ "react",
144
+ "vue",
145
+ "typescript",
146
+ "andreasnicolaou"
147
+ ]
148
+ }
@@ -1,3 +0,0 @@
1
- export default {
2
- extends: ['@commitlint/config-conventional'],
3
- };
package/junit.xml DELETED
@@ -1,311 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <testsuites name="jest tests" tests="153" failures="0" errors="0" time="2.258">
3
- <testsuite name="Tock" errors="0" failures="0" skipped="0" timestamp="2026-07-01T05:40:33" time="1.209" tests="153">
4
- <testcase classname="src\index.test.ts" name="Tock construction should create with locale and timezone" time="0.001">
5
- </testcase>
6
- <testcase classname="src\index.test.ts" name="Tock construction should default to now when no date is provided" time="0.001">
7
- </testcase>
8
- <testcase classname="src\index.test.ts" name="Tock construction should accept a string date" time="0.001">
9
- </testcase>
10
- <testcase classname="src\index.test.ts" name="Tock construction should accept date parts objects and arrays as zoned wall-clock input" time="0.044">
11
- </testcase>
12
- <testcase classname="src\index.test.ts" name="Tock construction should clone a Date defensively so external mutation does not leak in" time="0">
13
- </testcase>
14
- <testcase classname="src\index.test.ts" name="Tock construction should expose locale and timezone" time="0">
15
- </testcase>
16
- <testcase classname="src\index.test.ts" name="Tock immutability should not mutate the original instance when setting" time="0.001">
17
- </testcase>
18
- <testcase classname="src\index.test.ts" name="Tock immutability clone should return an equal but distinct instance" time="0.001">
19
- </testcase>
20
- <testcase classname="src\index.test.ts" name="Tock getters and setters should get local date parts" time="0.001">
21
- </testcase>
22
- <testcase classname="src\index.test.ts" name="Tock getters and setters should set each unit immutably" time="0.002">
23
- </testcase>
24
- <testcase classname="src\index.test.ts" name="Tock getters and setters should get and set day of week" time="0.001">
25
- </testcase>
26
- <testcase classname="src\index.test.ts" name="Tock get() / set() should get values via get()" time="0.003">
27
- </testcase>
28
- <testcase classname="src\index.test.ts" name="Tock get() / set() should set values via set()" time="0.002">
29
- </testcase>
30
- <testcase classname="src\index.test.ts" name="Tock get() / set() should throw on invalid unit for set()" time="0.019">
31
- </testcase>
32
- <testcase classname="src\index.test.ts" name="Tock get() / set() returns NaN for unknown get units from untyped callers" time="0">
33
- </testcase>
34
- <testcase classname="src\index.test.ts" name="Tock weekday() is relative to the configured first day of the week, unlike day()" time="0.001">
35
- </testcase>
36
- <testcase classname="src\index.test.ts" name="Tock weekday() sets the date to the requested relative weekday" time="0.003">
37
- </testcase>
38
- <testcase classname="src\index.test.ts" name="Tock quarter() and dayOfYear() setters quarter(value) preserves the month offset within the quarter" time="0">
39
- </testcase>
40
- <testcase classname="src\index.test.ts" name="Tock quarter() and dayOfYear() setters dayOfYear(value) sets the day of the year, rolling into later months/years like native Date" time="0.001">
41
- </testcase>
42
- <testcase classname="src\index.test.ts" name="Tock add / subtract should add simple time units" time="0">
43
- </testcase>
44
- <testcase classname="src\index.test.ts" name="Tock add / subtract should add weeks" time="0.001">
45
- </testcase>
46
- <testcase classname="src\index.test.ts" name="Tock add / subtract should subtract as the inverse of add" time="0">
47
- </testcase>
48
- <testcase classname="src\index.test.ts" name="Tock add / subtract should clamp month overflow (Jan 31 + 1 month -&gt; Feb, not Mar)" time="0">
49
- </testcase>
50
- <testcase classname="src\index.test.ts" name="Tock add / subtract should land on Feb 29 in a leap year" time="0.001">
51
- </testcase>
52
- <testcase classname="src\index.test.ts" name="Tock add / subtract should add quarters" time="0">
53
- </testcase>
54
- <testcase classname="src\index.test.ts" name="Tock add / subtract should clamp year overflow for Feb 29" time="0">
55
- </testcase>
56
- <testcase classname="src\index.test.ts" name="Tock add / subtract returns a clone for unknown units from untyped callers" time="0.001">
57
- </testcase>
58
- <testcase classname="src\index.test.ts" name="Tock diff should compute differences in various units" time="0.001">
59
- </testcase>
60
- <testcase classname="src\index.test.ts" name="Tock diff should be negative when the wrapped date is earlier" time="0.001">
61
- </testcase>
62
- <testcase classname="src\index.test.ts" name="Tock diff should accept a Tock as input" time="0">
63
- </testcase>
64
- <testcase classname="src\index.test.ts" name="Tock diff should default to milliseconds" time="0.001">
65
- </testcase>
66
- <testcase classname="src\index.test.ts" name="Tock diff should compute quarter diff" time="0">
67
- </testcase>
68
- <testcase classname="src\index.test.ts" name="Tock diff falls back to millisecond diff for unknown units from untyped callers" time="0.001">
69
- </testcase>
70
- <testcase classname="src\index.test.ts" name="Tock diff should compute calendar-boundary differences separately from elapsed duration" time="0.002">
71
- </testcase>
72
- <testcase classname="src\index.test.ts" name="Tock diff returns NaN for unknown calendar diff units from untyped callers" time="0.001">
73
- </testcase>
74
- <testcase classname="src\index.test.ts" name="Tock diff precise=true returns a floating-point value for fixed-duration units" time="0">
75
- </testcase>
76
- <testcase classname="src\index.test.ts" name="Tock diff precise=true interpolates a fractional month/quarter/year" time="0.003">
77
- </testcase>
78
- <testcase classname="src\index.test.ts" name="Tock comparisons isAfter / isBefore" time="0">
79
- </testcase>
80
- <testcase classname="src\index.test.ts" name="Tock comparisons isSame exact" time="0.001">
81
- </testcase>
82
- <testcase classname="src\index.test.ts" name="Tock comparisons isSame with unit" time="0.003">
83
- </testcase>
84
- <testcase classname="src\index.test.ts" name="Tock comparisons isBetween exclusive and inclusive (boolean form)" time="0.001">
85
- </testcase>
86
- <testcase classname="src\index.test.ts" name="Tock comparisons isBetween supports independent per-side inclusivity" time="0.001">
87
- </testcase>
88
- <testcase classname="src\index.test.ts" name="Tock comparisons detects today, tomorrow and yesterday in the configured timezone" time="0.001">
89
- </testcase>
90
- <testcase classname="src\index.test.ts" name="Tock startOf / endOf startOf snaps down" time="0.002">
91
- </testcase>
92
- <testcase classname="src\index.test.ts" name="Tock startOf / endOf startOf week snaps to Sunday" time="0.001">
93
- </testcase>
94
- <testcase classname="src\index.test.ts" name="Tock startOf / endOf startOf quarter snaps to first month of quarter" time="0.001">
95
- </testcase>
96
- <testcase classname="src\index.test.ts" name="Tock startOf / endOf endOf is one ms before the next unit" time="0.001">
97
- </testcase>
98
- <testcase classname="src\index.test.ts" name="Tock startOf / endOf endOf year" time="0.001">
99
- </testcase>
100
- <testcase classname="src\index.test.ts" name="Tock startOf / endOf endOf millisecond returns a clone" time="0">
101
- </testcase>
102
- <testcase classname="src\index.test.ts" name="Tock startOf / endOf startOf returns a clone for unknown units from untyped callers" time="0">
103
- </testcase>
104
- <testcase classname="src\index.test.ts" name="Tock calendar helpers isLeapYear" time="0">
105
- </testcase>
106
- <testcase classname="src\index.test.ts" name="Tock calendar helpers daysInMonth" time="0.001">
107
- </testcase>
108
- <testcase classname="src\index.test.ts" name="Tock calendar helpers quarter" time="0">
109
- </testcase>
110
- <testcase classname="src\index.test.ts" name="Tock calendar helpers dayOfYear, week, isoWeek, isoDay" time="0">
111
- </testcase>
112
- <testcase classname="src\index.test.ts" name="Tock calendar helpers isoDay returns 7 for Sunday" time="0">
113
- </testcase>
114
- <testcase classname="src\index.test.ts" name="Tock calendar helpers weekYear, weeksInYear, isoWeekYear, isoWeeksInYear" time="0">
115
- </testcase>
116
- <testcase classname="src\index.test.ts" name="Tock static helpers isValid" time="0">
117
- </testcase>
118
- <testcase classname="src\index.test.ts" name="Tock static helpers max / min" time="0.001">
119
- </testcase>
120
- <testcase classname="src\index.test.ts" name="Tock static helpers isTock" time="0">
121
- </testcase>
122
- <testcase classname="src\index.test.ts" name="Tock static helpers guessTimezone" time="0">
123
- </testcase>
124
- <testcase classname="src\index.test.ts" name="Tock static helpers instance isValid" time="0.001">
125
- </testcase>
126
- <testcase classname="src\index.test.ts" name="Tock formatting formats with presets" time="0.002">
127
- </testcase>
128
- <testcase classname="src\index.test.ts" name="Tock formatting formats with explicit options" time="0">
129
- </testcase>
130
- <testcase classname="src\index.test.ts" name="Tock formatting formats with no argument" time="0">
131
- </testcase>
132
- <testcase classname="src\index.test.ts" name="Tock formatting falls back to default Intl formatting for unknown presets from untyped callers" time="0">
133
- </testcase>
134
- <testcase classname="src\index.test.ts" name="Tock formatting respects locale" time="0.001">
135
- </testcase>
136
- <testcase classname="src\index.test.ts" name="Tock token formatting (formatPattern) matches expected token output" time="0.004">
137
- </testcase>
138
- <testcase classname="src\index.test.ts" name="Tock token formatting (formatPattern) handles names, 12h clock, meridiem and milliseconds" time="0.004">
139
- </testcase>
140
- <testcase classname="src\index.test.ts" name="Tock token formatting (formatPattern) supports [escaped] literals" time="0.002">
141
- </testcase>
142
- <testcase classname="src\index.test.ts" name="Tock token formatting (formatPattern) treats an unclosed [ as a literal character rather than throwing" time="0.002">
143
- </testcase>
144
- <testcase classname="src\index.test.ts" name="Tock token formatting (formatPattern) emits the timezone offset (Z / ZZ) in the configured zone" time="0.004">
145
- </testcase>
146
- <testcase classname="src\index.test.ts" name="Tock token formatting (formatPattern) respects locale for month/weekday names" time="0.001">
147
- </testcase>
148
- <testcase classname="src\index.test.ts" name="Tock parsing (static parse) parses numeric patterns into the configured timezone" time="0">
149
- </testcase>
150
- <testcase classname="src\index.test.ts" name="Tock parsing (static parse) parses month names and 12-hour meridiem" time="0">
151
- </testcase>
152
- <testcase classname="src\index.test.ts" name="Tock parsing (static parse) round-trips with formatPattern" time="0.001">
153
- </testcase>
154
- <testcase classname="src\index.test.ts" name="Tock parsing (static parse) parses 2-digit years and milliseconds" time="0.001">
155
- </testcase>
156
- <testcase classname="src\index.test.ts" name="Tock parsing (static parse) throws on input that does not match the pattern" time="0.001">
157
- </testcase>
158
- <testcase classname="src\index.test.ts" name="Tock parsing (static parse) throws on unknown month names instead of falling back to January" time="0">
159
- </testcase>
160
- <testcase classname="src\index.test.ts" name="Tock parsing (static parse) throws on out-of-range date and time fields" time="0.008">
161
- </testcase>
162
- <testcase classname="src\index.test.ts" name="Tock ordinal &amp; isSameOrBefore/After ordinal day-of-month" time="0.001">
163
- </testcase>
164
- <testcase classname="src\index.test.ts" name="Tock ordinal &amp; isSameOrBefore/After isSameOrAfter / isSameOrBefore" time="0.002">
165
- </testcase>
166
- <testcase classname="src\index.test.ts" name="Tock advanced format tokens Do / Q / k / kk / X / x" time="0.005">
167
- </testcase>
168
- <testcase classname="src\index.test.ts" name="Tock advanced format tokens w / ww / W / WW" time="0.004">
169
- </testcase>
170
- <testcase classname="src\index.test.ts" name="Tock advanced format tokens wo / Wo (ordinal week of year)" time="0.004">
171
- </testcase>
172
- <testcase classname="src\index.test.ts" name="Tock advanced format tokens wo/Wo are consumed but ignored when parsing (derived values)" time="0.001">
173
- </testcase>
174
- <testcase classname="src\index.test.ts" name="Tock localized format tokens expands the L-family to English patterns" time="0.008">
175
- </testcase>
176
- <testcase classname="src\index.test.ts" name="Tock localized format tokens honours locale for names inside localized tokens" time="0.001">
177
- </testcase>
178
- <testcase classname="src\index.test.ts" name="Tock configurable first-day-of-week defaults to Sunday" time="0.003">
179
- </testcase>
180
- <testcase classname="src\index.test.ts" name="Tock configurable first-day-of-week respects a Monday week start" time="0.003">
181
- </testcase>
182
- <testcase classname="src\index.test.ts" name="Tock configurable first-day-of-week week() numbering shifts with the week start" time="0">
183
- </testcase>
184
- <testcase classname="src\index.test.ts" name="Tock configurable first-day-of-week is preserved across with* derivations" time="0">
185
- </testcase>
186
- <testcase classname="src\index.test.ts" name="Tock configurable first-day-of-week builds a padded calendar month using the configured week start" time="0.041">
187
- </testcase>
188
- <testcase classname="src\index.test.ts" name="Tock configurable first-day-of-week localizes calendar month labels and weekday labels" time="0.039">
189
- </testcase>
190
- <testcase classname="src\index.test.ts" name="Tock configurable first-day-of-week can render a viewed month with a separate selected date" time="0.037">
191
- </testcase>
192
- <testcase classname="src\index.test.ts" name="Tock configurable first-day-of-week formats calendar date cells with token, Intl and callback options" time="0.161">
193
- </testcase>
194
- <testcase classname="src\index.test.ts" name="Tock Day.js-style compatibility helpers formats calendar-style relative labels" time="0.009">
195
- </testcase>
196
- <testcase classname="src\index.test.ts" name="Tock Day.js-style compatibility helpers formats relative time with from/fromNow/to/toNow aliases" time="0.009">
197
- </testcase>
198
- <testcase classname="src\index.test.ts" name="Tock Day.js-style compatibility helpers exposes utc/local timezone helpers and utcOffset" time="0">
199
- </testcase>
200
- <testcase classname="src\index.test.ts" name="Tock Duration creates from amount + unit and converts (as*)" time="0.001">
201
- </testcase>
202
- <testcase classname="src\index.test.ts" name="Tock Duration creates from a components object" time="0">
203
- </testcase>
204
- <testcase classname="src\index.test.ts" name="Tock Duration identifies Duration instances" time="0">
205
- </testcase>
206
- <testcase classname="src\index.test.ts" name="Tock Duration decomposes into signed components" time="0.001">
207
- </testcase>
208
- <testcase classname="src\index.test.ts" name="Tock Duration humanizes (locale-aware, optional suffix)" time="0.001">
209
- </testcase>
210
- <testcase classname="src\index.test.ts" name="Tock Duration add / subtract" time="0.001">
211
- </testcase>
212
- <testcase classname="src\index.test.ts" name="Tock Duration defaults duration add/subtract units to milliseconds" time="0">
213
- </testcase>
214
- <testcase classname="src\index.test.ts" name="Tock Duration throws on invalid units from untyped callers" time="0.003">
215
- </testcase>
216
- <testcase classname="src\index.test.ts" name="Tock Duration toISOString / toJSON / valueOf" time="0.001">
217
- </testcase>
218
- <testcase classname="src\index.test.ts" name="Tock Duration omits the T-separator entirely for a date-only duration" time="0">
219
- </testcase>
220
- <testcase classname="src\index.test.ts" name="Tock Duration pairs naturally with diff" time="0">
221
- </testcase>
222
- <testcase classname="src\index.test.ts" name="Tock Duration exposes the full as*/component accessor surface" time="0">
223
- </testcase>
224
- <testcase classname="src\index.test.ts" name="Tock Duration supports Day.js-style duration get() and format()" time="0.001">
225
- </testcase>
226
- <testcase classname="src\index.test.ts" name="Tock Duration humanizes larger spans (minutes/days/years thresholds)" time="0.001">
227
- </testcase>
228
- <testcase classname="src\index.test.ts" name="Tock parsing advanced tokens parses Do, kk and consumes Q/w" time="0.001">
229
- </testcase>
230
- <testcase classname="src\index.test.ts" name="Tock parsing advanced tokens parses unix tokens X (seconds) and x (milliseconds)" time="0.001">
231
- </testcase>
232
- <testcase classname="src\index.test.ts" name="Tock conversion toDate returns a fresh Date" time="0">
233
- </testcase>
234
- <testcase classname="src\index.test.ts" name="Tock conversion toISOString / toJSON" time="0.001">
235
- </testcase>
236
- <testcase classname="src\index.test.ts" name="Tock conversion toArray / toObject return zoned calendar parts" time="0">
237
- </testcase>
238
- <testcase classname="src\index.test.ts" name="Tock conversion toString" time="0">
239
- </testcase>
240
- <testcase classname="src\index.test.ts" name="Tock conversion unix / valueOf" time="0">
241
- </testcase>
242
- <testcase classname="src\index.test.ts" name="Tock conversion valueOf enables numeric coercion" time="0">
243
- </testcase>
244
- <testcase classname="src\index.test.ts" name="Tock with* derivations withDate keeps locale &amp; timezone" time="0">
245
- </testcase>
246
- <testcase classname="src\index.test.ts" name="Tock with* derivations withLocale / withTimezone keep the date" time="0">
247
- </testcase>
248
- <testcase classname="src\index.test.ts" name="Tock timezone awareness reads components in the configured timezone, not the host" time="0.001">
249
- </testcase>
250
- <testcase classname="src\index.test.ts" name="Tock timezone awareness builds the right instant when setting wall-clock components in a zone" time="0.002">
251
- </testcase>
252
- <testcase classname="src\index.test.ts" name="Tock timezone awareness the same wall clock in different zones maps to different instants" time="0.004">
253
- </testcase>
254
- <testcase classname="src\index.test.ts" name="Tock timezone awareness day-of-week, quarter and week are computed in the configured zone" time="0.001">
255
- </testcase>
256
- <testcase classname="src\index.test.ts" name="Tock timezone awareness calendar add preserves wall-clock time across a DST spring-forward" time="0.002">
257
- </testcase>
258
- <testcase classname="src\index.test.ts" name="Tock timezone awareness resolves a wall-clock instant correctly even when constructed right at a DST boundary" time="0.002">
259
- </testcase>
260
- <testcase classname="src\index.test.ts" name="Tock timezone awareness startOf(&quot;day&quot;) snaps to local midnight in the zone" time="0">
261
- </testcase>
262
- <testcase classname="src\index.test.ts" name="Tock timezone awareness withTimezone keeps the instant but re-interprets the wall clock" time="0">
263
- </testcase>
264
- <testcase classname="src\index.test.ts" name="Tock validation throws when setting on an invalid date" time="0">
265
- </testcase>
266
- <testcase classname="src\index.test.ts" name="Tock validation throws in diff against an invalid input" time="0">
267
- </testcase>
268
- <testcase classname="src\index.test.ts" name="Tock timeAgo returns a string for a past date" time="0">
269
- </testcase>
270
- <testcase classname="src\index.test.ts" name="Tock timeAgo returns a string for a future date" time="0">
271
- </testcase>
272
- <testcase classname="src\index.test.ts" name="Tock timeAgo handles seconds, hours, days, months, years ranges" time="0">
273
- </testcase>
274
- <testcase classname="src\index.test.ts" name="Tock timeAgoLive emits a timeAgo string immediately" time="0">
275
- </testcase>
276
- <testcase classname="src\index.test.ts" name="Tock timeAgoLive refreshes on a timer (fake timers)" time="0.001">
277
- </testcase>
278
- <testcase classname="src\index.test.ts" name="Tock timeAgoLive supports the timeAgoSubscribe convenience helper" time="0.001">
279
- </testcase>
280
- <testcase classname="src\index.test.ts" name="Tock timeAgoLive gives a late subscriber an immediate value without restarting the shared timer" time="0">
281
- </testcase>
282
- <testcase classname="src\index.test.ts" name="Tock timeAgoLive adapts its refresh interval as the target moves further away (minute/hour/day tiers)" time="0">
283
- </testcase>
284
- <testcase classname="src\index.test.ts" name="Tock timeAgoLive uses the 30-minute tier once the target is more than an hour away (but under a day)" time="0.001">
285
- </testcase>
286
- <testcase classname="src\index.test.ts" name="Tock timeAgoLive uses the hour tier once the target is more than a day away" time="0">
287
- </testcase>
288
- <testcase classname="src\index.test.ts" name="Tock tock() factory creates a Tock from a string/Date/Tock" time="0">
289
- </testcase>
290
- <testcase classname="src\index.test.ts" name="Tock tock() factory defaults to now with no argument" time="0.001">
291
- </testcase>
292
- <testcase classname="src\index.test.ts" name="Tock tock() factory passes through locale, timezone and weekStartsOn options" time="0">
293
- </testcase>
294
- <testcase classname="src\index.test.ts" name="Tock tock() factory tock.utc shorthand fixes the timezone to UTC" time="0.001">
295
- </testcase>
296
- <testcase classname="src\index.test.ts" name="Tock tock() factory tock.unix builds from seconds" time="0">
297
- </testcase>
298
- <testcase classname="src\index.test.ts" name="Tock tock() factory tock.unix works with no options argument" time="0">
299
- </testcase>
300
- <testcase classname="src\index.test.ts" name="Tock tock() factory exposes static helpers (duration / parse / min / max / isValid / guessTimezone)" time="0.001">
301
- </testcase>
302
- <testcase classname="src\index.test.ts" name="Tock tock() factory withDefaults returns an independent factory without mutating the original" time="0">
303
- </testcase>
304
- <testcase classname="src\index.test.ts" name="Tock tock() factory withDefaults flows defaults into duration() and parse() too" time="0.001">
305
- </testcase>
306
- <testcase classname="src\index.test.ts" name="Tock tock() factory withDefaults merges progressively when chained" time="0">
307
- </testcase>
308
- <testcase classname="src\index.test.ts" name="Tock tock() factory withDefaults per-call options still override the factory defaults" time="0.001">
309
- </testcase>
310
- </testsuite>
311
- </testsuites>