@miso.ai/server-commons 0.5.1 → 0.5.2
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/package.json +1 -1
- package/src/date.js +2 -1
package/package.json
CHANGED
package/src/date.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const DURATION_EXPR = /^(\d+)([s|m|h|d])$/;
|
|
1
|
+
const DURATION_EXPR = /^(\d+)([s|m|h|d|w])$/;
|
|
2
2
|
const TS_PER_UNIT = {
|
|
3
3
|
ms: 1,
|
|
4
4
|
s: 1000,
|
|
@@ -6,6 +6,7 @@ const TS_PER_UNIT = {
|
|
|
6
6
|
TS_PER_UNIT.m = TS_PER_UNIT.s * 60;
|
|
7
7
|
TS_PER_UNIT.h = TS_PER_UNIT.m * 60;
|
|
8
8
|
TS_PER_UNIT.d = TS_PER_UNIT.h * 24;
|
|
9
|
+
TS_PER_UNIT.w = TS_PER_UNIT.d * 7;
|
|
9
10
|
//TS_PER_UNIT.M = TS_PER_UNIT.d * 31;
|
|
10
11
|
//TS_PER_UNIT.y = TS_PER_UNIT.d * 366;
|
|
11
12
|
|