From 32b40631851c3c3f5ae2400c4bb89e009e71a9da Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 18 Jun 2024 17:21:34 -0500 Subject: Verify email reminders (#4510) * Clarify intent * Increase email reminder period to once per day * Fallback * Snooze immediately after account creation, prevent showing right after signup * Fix e2e test exports * Remove redundant check * Better simple date generation * Replace in DateField * Use non-string comparison * Revert change to unrelated code * Also parse * Remove side effect --- src/lib/strings/time.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/lib/strings/time.ts') diff --git a/src/lib/strings/time.ts b/src/lib/strings/time.ts index 1194e0240..bfefea9bc 100644 --- a/src/lib/strings/time.ts +++ b/src/lib/strings/time.ts @@ -19,3 +19,14 @@ export function getAge(birthDate: Date): number { } return age } + +/** + * Compares two dates by year, month, and day only + */ +export function simpleAreDatesEqual(a: Date, b: Date): boolean { + return ( + a.getFullYear() === b.getFullYear() && + a.getMonth() === b.getMonth() && + a.getDate() === b.getDate() + ) +} -- cgit 1.4.1