@sprucelabs/calendar-utils 31.3.7 → 31.3.8
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,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DateUtil, Locale } from '../types/calendar.types';
|
|
2
2
|
export default class DateUtilDecorator {
|
|
3
3
|
private locale;
|
|
4
4
|
constructor(locale: Locale);
|
|
5
|
-
makeLocaleAware(dateUtil: any):
|
|
5
|
+
makeLocaleAware(dateUtil: any): DateUtil;
|
|
6
6
|
private addOffset;
|
|
7
7
|
}
|
|
@@ -22,6 +22,8 @@ export default class DateUtilDecorator {
|
|
|
22
22
|
return this.addOffset(dateUtil.setTimeOfDay(...args));
|
|
23
23
|
}, format: (date, format) => {
|
|
24
24
|
return dateUtil.format(this.addOffset(date, false), format);
|
|
25
|
+
}, getStartOfDay: (date) => {
|
|
26
|
+
return this.addOffset(dateUtil.getStartOfDay(date));
|
|
25
27
|
} });
|
|
26
28
|
}
|
|
27
29
|
addOffset(value, shouldInverse = true) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DateUtil, Locale } from '../types/calendar.types';
|
|
2
2
|
export default class DateUtilDecorator {
|
|
3
3
|
private locale;
|
|
4
4
|
constructor(locale: Locale);
|
|
5
|
-
makeLocaleAware(dateUtil: any):
|
|
5
|
+
makeLocaleAware(dateUtil: any): DateUtil;
|
|
6
6
|
private addOffset;
|
|
7
7
|
}
|
|
@@ -24,6 +24,8 @@ class DateUtilDecorator {
|
|
|
24
24
|
return this.addOffset(dateUtil.setTimeOfDay(...args));
|
|
25
25
|
}, format: (date, format) => {
|
|
26
26
|
return dateUtil.format(this.addOffset(date, false), format);
|
|
27
|
+
}, getStartOfDay: (date) => {
|
|
28
|
+
return this.addOffset(dateUtil.getStartOfDay(date));
|
|
27
29
|
} });
|
|
28
30
|
}
|
|
29
31
|
addOffset(value, shouldInverse = true) {
|