]> source.dussan.org Git - nextcloud-server.git/commitdiff
enh: rename to saturday sunday
authorChristopher Ng <chrng8@gmail.com>
Thu, 3 Aug 2023 23:29:29 +0000 (16:29 -0700)
committerChristopher Ng <chrng8@gmail.com>
Wed, 9 Aug 2023 17:41:18 +0000 (10:41 -0700)
Signed-off-by: Christopher Ng <chrng8@gmail.com>
apps/files_reminders/src/shared/utils.ts

index cb2beeb92158ffcec78a7c0fb787f4fdcdf48d22..41b252a3910b4ae65f9a2f1af7da0d07ae250419 100644 (file)
@@ -51,28 +51,28 @@ export const getDateTime = (dateTime: DateTimePreset): Date => {
 
                [DateTimePreset.ThisWeekend]: () => {
                        const today = moment()
-                       const weekendFirstDay = moment()
+                       const saturday = moment()
                                .startOf('isoWeek')
                                .add(5, 'day')
                                .add(9, 'hour')
-                       const weekendSecondDay = moment()
+                       const sunday = moment()
                                .startOf('isoWeek')
                                .add(6, 'day')
                                .add(9, 'hour')
-                       if (today.isSame(weekendFirstDay, 'date')) {
-                               return weekendFirstDay
+                       if (today.isSame(saturday, 'date')) {
+                               return saturday
                                        .add(1, 'day')
                                        .toDate()
                        }
-                       if (today.isSame(weekendSecondDay, 'date')) {
-                               return weekendSecondDay
+                       if (today.isSame(sunday, 'date')) {
+                               return sunday
                                        .add(1, 'week')
                                        .startOf('isoWeek')
                                        .add(5, 'day')
                                        .add(9, 'hour')
                                        .toDate()
                        }
-                       return weekendFirstDay.toDate()
+                       return saturday.toDate()
                },
 
                [DateTimePreset.NextWeek]: () => {