@digitraffic/common 2023.5.9-1 → 2023.5.10-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/dist/utils/date-utils.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.dateFromIsoString = exports.countDiffInSeconds = exports.countDiffMs = void 0;
|
3
|
+
exports.dateFromIsoString = exports.countDiffInSeconds = exports.countDiffMs = exports.EPOCH = void 0;
|
4
|
+
exports.EPOCH = new Date(Date.UTC(1970, 0, 1));
|
4
5
|
/**
|
5
6
|
* Counts difference in milliseconds between dates.
|
6
7
|
* @param start
|
package/package.json
CHANGED
package/src/utils/date-utils.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
export const EPOCH = new Date(Date.UTC(1970, 0, 1));
|
2
2
|
/**
|
3
3
|
* Counts difference in milliseconds between dates.
|
4
4
|
* @param start
|
@@ -14,7 +14,7 @@ export function countDiffMs(start: Date, end: Date): number {
|
|
14
14
|
* @param end
|
15
15
|
*/
|
16
16
|
export function countDiffInSeconds(start: Date, end: Date): number {
|
17
|
-
return countDiffMs(start, end)/1000;
|
17
|
+
return countDiffMs(start, end) / 1000;
|
18
18
|
}
|
19
19
|
|
20
20
|
/**
|