فهرست منبع

Improve naming in date util function

arvid-e 5 ماه پیش
والد
کامیت
673610828c
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      apps/app/src/features/contribution-graph/utils/contribution-graph-utils.ts

+ 4 - 4
apps/app/src/features/contribution-graph/utils/contribution-graph-utils.ts

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