@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.
@@ -1,3 +1,4 @@
1
+ export declare const EPOCH: Date;
1
2
  /**
2
3
  * Counts difference in milliseconds between dates.
3
4
  * @param start
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitraffic/common",
3
- "version": "2023.5.9-1",
3
+ "version": "2023.5.10-1",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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
  /**