@pvorona/duration 0.0.1 → 0.1.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 CHANGED
@@ -1,11 +1,178 @@
1
- # duration
1
+ # @pvorona/duration
2
2
 
3
- This library was generated with [Nx](https://nx.dev).
3
+ An immutable duration type with unit conversions, comparisons, and basic arithmetic.
4
4
 
5
- ## Building
5
+ ## Install
6
6
 
7
- Run `nx build duration` to build the library.
7
+ ```bash
8
+ npm i @pvorona/duration
9
+ ```
8
10
 
9
- ## Running unit tests
11
+ ## Usage
10
12
 
11
- Run `nx test duration` to execute the unit tests via [Vitest](https://vitest.dev/).
13
+ ### Create and convert
14
+
15
+ ```ts
16
+ import { minutes } from '@pvorona/duration';
17
+
18
+ const d = minutes(5);
19
+ d.toSeconds(); // 300
20
+ d.toMilliSeconds(); // 300_000
21
+ ```
22
+
23
+ ### Compare
24
+
25
+ ```ts
26
+ import { milliSeconds, seconds } from '@pvorona/duration';
27
+
28
+ const a = seconds(1);
29
+ const b = milliSeconds(900);
30
+
31
+ a.greaterThan(b); // true
32
+ a.compare(b); // 1
33
+ ```
34
+
35
+ ### Arithmetic
36
+
37
+ ```ts
38
+ import { add, milliSeconds, seconds } from '@pvorona/duration';
39
+
40
+ const total = add(seconds(1), milliSeconds(500));
41
+ total.toMilliSeconds(); // 1500
42
+ ```
43
+
44
+ ### Between dates
45
+
46
+ ```ts
47
+ import { since } from '@pvorona/duration';
48
+
49
+ const startedAt = new Date(Date.now() - 2_000);
50
+ const elapsed = since(startedAt);
51
+ elapsed.toSeconds(); // ~2
52
+ ```
53
+
54
+ ## API
55
+
56
+ ### `const enum TimeUnit`
57
+
58
+ Time units supported by `duration(value, unit)` and `d.to(unit)`.
59
+
60
+ ```ts
61
+ export const enum TimeUnit {
62
+ MilliSecond,
63
+ Second,
64
+ Minute,
65
+ Hour,
66
+ Day,
67
+ Week,
68
+ Month,
69
+ Year,
70
+ }
71
+ ```
72
+
73
+ Notes:
74
+
75
+ - `Month` is treated as **30 days**
76
+ - `Year` is treated as **365.25 days**
77
+
78
+ Example:
79
+
80
+ ```ts
81
+ import { duration, TimeUnit } from '@pvorona/duration';
82
+
83
+ duration(2, TimeUnit.Hour).toMinutes(); // 120
84
+ ```
85
+
86
+ ### `type Duration`
87
+
88
+ An opaque, immutable duration value.
89
+
90
+ #### Properties
91
+
92
+ - **`isFinite: boolean`**: `true` unless the duration is infinite
93
+ - **`isInfinite: boolean`**: `true` for `infinite`
94
+ - **`isInstant: boolean`**: `true` for zero duration (`instant`)
95
+
96
+ #### Conversions
97
+
98
+ - **`to(unit: TimeUnit): number`**: convert to an arbitrary unit
99
+ - **`toMilliSeconds(): number`**
100
+ - **`toSeconds(): number`**
101
+ - **`toMinutes(): number`**
102
+ - **`toHours(): number`**
103
+ - **`toDays(): number`**
104
+ - **`toWeeks(): number`**
105
+ - **`toMonths(): number`** (30-day months)
106
+ - **`toYears(): number`** (365.25-day years)
107
+
108
+ #### Comparisons
109
+
110
+ - **`equals(other: Duration): boolean`**
111
+ - **`lessThan(other: Duration): boolean`**
112
+ - **`lessThanOrEqual(other: Duration): boolean`**
113
+ - **`greaterThan(other: Duration): boolean`**
114
+ - **`greaterThanOrEqual(other: Duration): boolean`**
115
+ - **`compare(other: Duration): -1 | 0 | 1`**
116
+
117
+ Example (properties + conversion + comparison):
118
+
119
+ ```ts
120
+ import { milliSeconds, seconds, type Duration } from '@pvorona/duration';
121
+
122
+ function isShort(d: Duration) {
123
+ return d.isFinite && d.toSeconds() < 5;
124
+ }
125
+
126
+ const a = seconds(1);
127
+ const b = milliSeconds(900);
128
+
129
+ isShort(a); // true
130
+ a.greaterThan(b); // true
131
+ ```
132
+
133
+ ### Function API
134
+
135
+ #### Constructors
136
+
137
+ - `duration(value: number, unit: TimeUnit): Duration`
138
+ - `milliSeconds(value: number): Duration`
139
+ - `seconds(value: number): Duration`
140
+ - `minutes(value: number): Duration`
141
+ - `hours(value: number): Duration`
142
+ - `days(value: number): Duration`
143
+ - `weeks(value: number): Duration`
144
+ - `months(value: number): Duration`
145
+ - `years(value: number): Duration`
146
+
147
+ #### Date helpers
148
+
149
+ - `between(start: Date, end: Date): Duration`
150
+ - `since(start: Date): Duration`
151
+
152
+ #### Arithmetic helpers
153
+
154
+ - `add(a: Duration, b: Duration): Duration`
155
+ - `subtract(a: Duration, b: Duration): Duration`
156
+ - `multiply(a: Duration, b: number): Duration`
157
+ - `divide(a: Duration, b: number): Duration`
158
+
159
+ #### Constants
160
+
161
+ - `instant: Duration`
162
+ - `infinite: Duration`
163
+
164
+ #### Guards / equality
165
+
166
+ - `isDuration(value: unknown): value is Duration`
167
+ - `isEqual(a: Duration, b: Duration): boolean`
168
+
169
+ Example:
170
+
171
+ ```ts
172
+ import { isDuration, seconds } from '@pvorona/duration';
173
+
174
+ const maybe: unknown = seconds(1);
175
+ if (isDuration(maybe)) {
176
+ maybe.toMilliSeconds(); // ok, narrowed
177
+ }
178
+ ```
package/dist/index.js CHANGED
@@ -1,8 +1,6 @@
1
- function i(t) {
2
- return t !== null && typeof t == "object";
3
- }
4
- var f = /* @__PURE__ */ ((t) => (t[t.MilliSecond = 0] = "MilliSecond", t[t.Second = 1] = "Second", t[t.Minute = 2] = "Minute", t[t.Hour = 3] = "Hour", t[t.Day = 4] = "Day", t[t.Week = 5] = "Week", t[t.Month = 6] = "Month", t[t.Year = 7] = "Year", t))(f || {});
5
- const e = /* @__PURE__ */ Symbol("milliSeconds"), u = {
1
+ import { isObject as i } from "@pvorona/assert";
2
+ var c = /* @__PURE__ */ ((t) => (t[t.MilliSecond = 0] = "MilliSecond", t[t.Second = 1] = "Second", t[t.Minute = 2] = "Minute", t[t.Hour = 3] = "Hour", t[t.Day = 4] = "Day", t[t.Week = 5] = "Week", t[t.Month = 6] = "Month", t[t.Year = 7] = "Year", t))(c || {});
3
+ const n = /* @__PURE__ */ Symbol("milliSeconds"), o = {
6
4
  0: 1,
7
5
  1: 1e3,
8
6
  2: 60 * 1e3,
@@ -21,12 +19,12 @@ const e = /* @__PURE__ */ Symbol("milliSeconds"), u = {
21
19
  365.25 * 24 * 60 * 60 * 1e3
22
20
  )
23
21
  }, a = {
24
- [e]: 0,
22
+ [n]: 0,
25
23
  isFinite: !1,
26
24
  isInfinite: !1,
27
25
  isInstant: !1,
28
26
  to(t) {
29
- return this[e] / u[t];
27
+ return this[n] / o[t];
30
28
  },
31
29
  toMilliSeconds() {
32
30
  return this.to(
@@ -77,112 +75,131 @@ const e = /* @__PURE__ */ Symbol("milliSeconds"), u = {
77
75
  );
78
76
  },
79
77
  equals(t) {
80
- return this[e] === t[e];
78
+ return this[n] === t[n];
81
79
  },
82
80
  lessThan(t) {
83
- return this[e] < t[e];
81
+ return this[n] < t[n];
84
82
  },
85
83
  lessThanOrEqual(t) {
86
- return this[e] <= t[e];
84
+ return this[n] <= t[n];
87
85
  },
88
86
  greaterThan(t) {
89
- return this[e] > t[e];
87
+ return this[n] > t[n];
90
88
  },
91
89
  greaterThanOrEqual(t) {
92
- return this[e] >= t[e];
90
+ return this[n] >= t[n];
93
91
  },
94
92
  compare(t) {
95
93
  return this.lessThan(t) ? -1 : this.greaterThan(t) ? 1 : 0;
96
94
  }
97
95
  };
98
- function s(t, r) {
99
- const o = Object.create(a);
100
- return o[e] = t * u[r], o.isFinite = t !== 1 / 0, o.isInfinite = t === 1 / 0, o.isInstant = t === 0, Object.freeze(o);
96
+ function f(t, r) {
97
+ const s = Object.create(a);
98
+ return s[n] = t * o[r], s.isFinite = t !== 1 / 0, s.isInfinite = t === 1 / 0, s.isInstant = t === 0, Object.freeze(s);
101
99
  }
102
- const n = Object.freeze({
103
- of(t, r) {
104
- return s(t, r);
105
- },
106
- ofMilliSeconds(t) {
107
- return n.of(
108
- t,
109
- 0
110
- /* MilliSecond */
111
- );
112
- },
113
- ofSeconds(t) {
114
- return n.of(
115
- t,
116
- 1
117
- /* Second */
118
- );
119
- },
120
- ofMinutes(t) {
121
- return n.of(
122
- t,
123
- 2
124
- /* Minute */
125
- );
126
- },
127
- ofHours(t) {
128
- return n.of(
129
- t,
130
- 3
131
- /* Hour */
132
- );
133
- },
134
- ofDays(t) {
135
- return n.of(
136
- t,
137
- 4
138
- /* Day */
139
- );
140
- },
141
- ofWeeks(t) {
142
- return n.of(
143
- t,
144
- 5
145
- /* Week */
146
- );
147
- },
148
- ofMonths(t) {
149
- return n.of(
150
- t,
151
- 6
152
- /* Month */
153
- );
154
- },
155
- ofYears(t) {
156
- return n.of(
157
- t,
158
- 7
159
- /* Year */
160
- );
161
- },
162
- between: (t, r) => n.of(
163
- r.getTime() - t.getTime(),
164
- 0
165
- /* MilliSecond */
166
- ),
167
- since: (t) => n.between(t, /* @__PURE__ */ new Date()),
168
- add: (t, r) => n.ofMilliSeconds(t[e] + r[e]),
169
- subtract: (t, r) => n.ofMilliSeconds(t[e] - r[e]),
170
- multiply: (t, r) => n.ofMilliSeconds(t[e] * r),
171
- divide: (t, r) => n.ofMilliSeconds(t[e] / r),
172
- ofInfinite: s(
173
- 1 / 0,
174
- 0
175
- /* MilliSecond */
176
- ),
177
- ofInstant: s(
178
- 0,
100
+ function e(t, r) {
101
+ return f(t, r);
102
+ }
103
+ function u(t) {
104
+ return e(
105
+ t,
179
106
  0
180
107
  /* MilliSecond */
181
- ),
182
- isDuration: (t) => i(t) && e in t,
183
- isEqual: (t, r) => t[e] === r[e]
184
- });
108
+ );
109
+ }
110
+ function d(t) {
111
+ return e(
112
+ t,
113
+ 1
114
+ /* Second */
115
+ );
116
+ }
117
+ function I(t) {
118
+ return e(
119
+ t,
120
+ 2
121
+ /* Minute */
122
+ );
123
+ }
124
+ function S(t) {
125
+ return e(
126
+ t,
127
+ 3
128
+ /* Hour */
129
+ );
130
+ }
131
+ function y(t) {
132
+ return e(
133
+ t,
134
+ 4
135
+ /* Day */
136
+ );
137
+ }
138
+ function M(t) {
139
+ return e(
140
+ t,
141
+ 5
142
+ /* Week */
143
+ );
144
+ }
145
+ function D(t) {
146
+ return e(
147
+ t,
148
+ 6
149
+ /* Month */
150
+ );
151
+ }
152
+ function O(t) {
153
+ return e(
154
+ t,
155
+ 7
156
+ /* Year */
157
+ );
158
+ }
159
+ function h(t, r) {
160
+ return u(r.getTime() - t.getTime());
161
+ }
162
+ function b(t) {
163
+ return h(t, /* @__PURE__ */ new Date());
164
+ }
165
+ function g(t, r) {
166
+ return u(t[n] + r[n]);
167
+ }
168
+ function E(t, r) {
169
+ return u(t[n] - r[n]);
170
+ }
171
+ function k(t, r) {
172
+ return u(t[n] * r);
173
+ }
174
+ function p(t, r) {
175
+ return u(t[n] / r);
176
+ }
177
+ const q = u(1 / 0), N = u(0);
178
+ function j(t) {
179
+ return i(t) && n in t;
180
+ }
181
+ function w(t, r) {
182
+ return t[n] === r[n];
183
+ }
185
184
  export {
186
- n as Duration,
187
- f as TimeUnit
185
+ c as TimeUnit,
186
+ g as add,
187
+ h as between,
188
+ y as days,
189
+ p as divide,
190
+ e as duration,
191
+ S as hours,
192
+ q as infinite,
193
+ N as instant,
194
+ j as isDuration,
195
+ w as isEqual,
196
+ u as milliSeconds,
197
+ I as minutes,
198
+ D as months,
199
+ k as multiply,
200
+ d as seconds,
201
+ b as since,
202
+ E as subtract,
203
+ M as weeks,
204
+ O as years
188
205
  };
@@ -8,9 +8,9 @@ export declare const enum TimeUnit {
8
8
  Month = 6,
9
9
  Year = 7
10
10
  }
11
- declare const milliSeconds: unique symbol;
11
+ declare const millisecondsTag: unique symbol;
12
12
  export type Duration = {
13
- readonly [milliSeconds]: number;
13
+ readonly [millisecondsTag]: number;
14
14
  readonly isFinite: boolean;
15
15
  readonly isInfinite: boolean;
16
16
  readonly isInstant: boolean;
@@ -30,26 +30,24 @@ export type Duration = {
30
30
  greaterThanOrEqual(other: Duration): boolean;
31
31
  compare(other: Duration): -1 | 0 | 1;
32
32
  };
33
- export declare const Duration: Readonly<{
34
- of(value: number, unit: TimeUnit): Duration;
35
- ofMilliSeconds(value: number): Duration;
36
- ofSeconds(value: number): Duration;
37
- ofMinutes(value: number): Duration;
38
- ofHours(value: number): Duration;
39
- ofDays(value: number): Duration;
40
- ofWeeks(value: number): Duration;
41
- ofMonths(value: number): Duration;
42
- ofYears(value: number): Duration;
43
- between: (start: Date, end: Date) => Duration;
44
- since: (start: Date) => Duration;
45
- add: (a: Duration, b: Duration) => Duration;
46
- subtract: (a: Duration, b: Duration) => Duration;
47
- multiply: (a: Duration, b: number) => Duration;
48
- divide: (a: Duration, b: number) => Duration;
49
- ofInfinite: Duration;
50
- ofInstant: Duration;
51
- isDuration: (value: unknown) => value is Duration;
52
- isEqual: (a: Duration, b: Duration) => boolean;
53
- }>;
33
+ export declare function duration(value: number, unit: TimeUnit): Duration;
34
+ export declare function milliSeconds(value: number): Duration;
35
+ export declare function seconds(value: number): Duration;
36
+ export declare function minutes(value: number): Duration;
37
+ export declare function hours(value: number): Duration;
38
+ export declare function days(value: number): Duration;
39
+ export declare function weeks(value: number): Duration;
40
+ export declare function months(value: number): Duration;
41
+ export declare function years(value: number): Duration;
42
+ export declare function between(start: Date, end: Date): Duration;
43
+ export declare function since(start: Date): Duration;
44
+ export declare function add(a: Duration, b: Duration): Duration;
45
+ export declare function subtract(a: Duration, b: Duration): Duration;
46
+ export declare function multiply(a: Duration, b: number): Duration;
47
+ export declare function divide(a: Duration, b: number): Duration;
48
+ export declare const infinite: Duration;
49
+ export declare const instant: Duration;
50
+ export declare function isDuration(value: unknown): value is Duration;
51
+ export declare function isEqual(a: Duration, b: Duration): boolean;
54
52
  export {};
55
53
  //# sourceMappingURL=duration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../../src/lib/duration.ts"],"names":[],"mappings":"AAMA,0BAAkB,QAAQ;IACxB,WAAW,IAAA;IACX,MAAM,IAAA;IACN,MAAM,IAAA;IACN,IAAI,IAAA;IACJ,GAAG,IAAA;IACH,IAAI,IAAA;IACJ,KAAK,IAAA;IACL,IAAI,IAAA;CACL;AAED,QAAA,MA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AE,CAAC,EAAE,MAAM,GAAG,QAAQ,CAEzD;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,GAAG,QAAQ,CAEvD;AAED,eAAO,MAAM,QAAQ,EAAE,QAAiC,CAAC;AACzD,eAAO,MAAM,OAAO,EAAE,QAA0B,CAAC;AAEjD,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAE5D;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAEzD"}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@pvorona/duration",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
+ "license": "MIT",
4
5
  "type": "module",
5
6
  "main": "./dist/index.js",
6
7
  "module": "./dist/index.js",
@@ -18,10 +19,10 @@
18
19
  "dist",
19
20
  "!**/*.tsbuildinfo"
20
21
  ],
21
- "nx": {
22
- "name": "duration"
22
+ "publishConfig": {
23
+ "access": "public"
23
24
  },
24
25
  "dependencies": {
25
- "@pvorona/assert": "^0.0.1"
26
+ "@pvorona/assert": "~0.0.2"
26
27
  }
27
28
  }