Skip to content

Commit

Permalink
web: fix reminder can't be set in january
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Jul 27, 2024
1 parent 1800ebe commit 4a3e23c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/web/src/stores/reminder-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ function reminderToCronExpression(reminder: Reminder) {
const dateTime = dayjs(date);

if (mode === "once" || !selectedDays) {
return dateTime.format("ss mm HH DD MM * YYYY");
return dateTime.format("00 mm HH DD MM * YYYY");
} else {
const cron = dateTime.format("ss mm HH").split(" ");
const cron = dateTime.format("00 mm HH").split(" ");
if (recurringMode === "year") {
cron.push(`${dateTime.date()}`); // day of month
cron.push(`${dateTime.month()}`); // month
cron.push(`${dateTime.month() + 1}`); // month
cron.push("*"); // day of week
cron.push("*"); // year
} else if (recurringMode === "week") {
Expand Down

0 comments on commit 4a3e23c

Please sign in to comment.