aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-08-03 16:29:29 -0700
committerChristopher Ng <chrng8@gmail.com>2023-08-09 10:41:18 -0700
commitc2dfc42899eaa8110e533ba9e09ea7b0fe5308aa (patch)
tree363e75e28397352441fefb8991f938ede4644181 /apps
parent07c0f7e25b011502fa5d5cac24ff6c18084ae2c7 (diff)
downloadnextcloud-server-c2dfc42899eaa8110e533ba9e09ea7b0fe5308aa.tar.gz
nextcloud-server-c2dfc42899eaa8110e533ba9e09ea7b0fe5308aa.zip
enh: rename to saturday sunday
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_reminders/src/shared/utils.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_reminders/src/shared/utils.ts b/apps/files_reminders/src/shared/utils.ts
index cb2beeb9215..41b252a3910 100644
--- a/apps/files_reminders/src/shared/utils.ts
+++ b/apps/files_reminders/src/shared/utils.ts
@@ -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]: () => {