sim-node-lib 0.0.43 → 0.0.44
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.
|
@@ -8,6 +8,6 @@ export declare class DateHelper {
|
|
|
8
8
|
static getDifferenceInMinutes(startData: Date, endData: Date): number;
|
|
9
9
|
static isTodayFromString(date: string): boolean;
|
|
10
10
|
static isTodayFromDate(data: Date): boolean;
|
|
11
|
-
static
|
|
12
|
-
static
|
|
11
|
+
static isYesterdayFromString(date: string): boolean;
|
|
12
|
+
static isYesterdayFromDate(data: Date): boolean;
|
|
13
13
|
}
|
|
@@ -31,10 +31,10 @@ class DateHelper {
|
|
|
31
31
|
const today = new Date();
|
|
32
32
|
return today.toISOString().split('T')[0] === data.toISOString().split('T')[0];
|
|
33
33
|
}
|
|
34
|
-
static
|
|
35
|
-
return this.
|
|
34
|
+
static isYesterdayFromString(date) {
|
|
35
|
+
return this.isYesterdayFromDate(new Date(date));
|
|
36
36
|
}
|
|
37
|
-
static
|
|
37
|
+
static isYesterdayFromDate(data) {
|
|
38
38
|
const today = new Date();
|
|
39
39
|
return (new Date(today.setDate(today.getDate() - 1)).toISOString().split('T')[0] ===
|
|
40
40
|
data.toISOString().split('T')[0]);
|