Files
FlockPal/backend/src/reminders/reminderDate.ts
T
blaisadmin 856753b012
Deploy / deploy-dev (push) Successful in 2m32s
Deploy / deploy-prod (push) Skipped
changed weight reminder schedule
2026-09-05 23:23:56 -04:00

6 lines
304 B
TypeScript

export const getReminderTimeZone = () => process.env.MILESTONE_REMINDER_TIME_ZONE?.trim() || 'America/New_York';
export const getReminderDate = (now = new Date()) => new Intl.DateTimeFormat('en-CA', {
timeZone: getReminderTimeZone(), year: 'numeric', month: '2-digit', day: '2-digit',
}).format(now);