|
|
@@ -7,11 +7,11 @@ export const getISOWeekId = (date: Date): string => {
|
|
|
return format(date, "RRRR-'W'II");
|
|
|
};
|
|
|
|
|
|
-export const daysSinceLastUpdate = (
|
|
|
- lastUpdateDate: Date,
|
|
|
- currentDate: Date = new Date(),
|
|
|
+export const getDaysDifference = (
|
|
|
+ dateFrom: Date,
|
|
|
+ dateTo: Date = new Date(),
|
|
|
): number => {
|
|
|
- const diffDays = differenceInDays(lastUpdateDate, currentDate);
|
|
|
+ const diffDays = differenceInDays(dateFrom, dateTo);
|
|
|
return Math.max(0, diffDays);
|
|
|
};
|
|
|
|