A birthday reminder sounds like a cron job. It is not, and the gap between those two ideas is where every date bug lives.
0 9 * * * fires at nine o'clock every day. A birthday reminder has to fire once a year, at a useful hour, in the user's current timezone, for a date that may not exist this year, possibly several days in advance, on a device that was switched off at the moment it was due.
The cases that break naive implementations
February 29
Roughly one in 1,461 people has a birthday your calendar logic does not have. Three years in four you must decide: notify on the 28th, notify on March 1, or skip. There is no correct answer, only a documented one - and a silent skip is the option users notice.
Timezone drift
A date without a timezone is not a point in time. If a reminder is scheduled in the timezone where it was created and the user then flies somewhere else, it fires at the wrong local hour. Store the intent - 'the 14th, local time, wherever they are' - not a resolved absolute timestamp.
Daylight saving transitions
Schedule something for 02:30 local time and in some zones, on some dates, that instant does not exist. In others it happens twice. Most date libraries have an opinion about this, and it is worth finding out what yours is before a user does.
The year is optional
People often know a friend's birthday but not their birth year. If your schema has a non-nullable date_of_birth, you have forced a lie - usually a fake year that then surfaces as a wrong age.
BirthdayEntry {
month: 1-12 // required
day: 1-31 // required
year: int | null // optional - age only when present
lead_times: [0, 1, 7] // days before, user-chosen
}
Device off at the critical moment
Local notifications are scheduled with the OS ahead of time rather than evaluated when due. That changes the design: you are not running a daily check, you are maintaining a rolling window of registered notifications, which has to be reconciled whenever entries change.
Platform notification limits
Mobile operating systems cap how many local notifications an app can have pending. With multiple lead times per person, a few hundred contacts will exceed that cap. The fix is to schedule only a forward window and top it up, rather than registering everything up front.
Lead time is the whole product
The functional insight is unglamorous: a same-day reminder is usually useless.
By the time it fires, whatever you might have done - ordered something, arranged a call, written something personal - is no longer possible. The reminder tells you that you have already failed, which is strictly worse than not knowing.
So lead time is not a preference toggle, it is the core feature:
| Lead time | What it enables |
|---|---|
| 7 days | Order a gift, arrange something |
| 1 day | Write something real, plan a call |
| Same day | Send a message |
Which means multiple lead times per entry, not one global setting. The people you want a week for and the people you want the morning of are different people.
Why local-first fits this problem
A birthday list is a social graph. Names, dates, relationships - it is exactly the kind of data that is uncomfortable to hold on someone else's server, and it carries no benefit from being there.
The app does not need a backend to compute anything. Date arithmetic is local, notifications are local, storage is small. Keeping it on-device removes a breach surface, removes an account flow, and removes the recurring cost of running infrastructure for a utility that earns very little per user.
Checklist if you are building recurring reminders
- Store month/day separately from year, and make year nullable.
- Decide and document your February 29 policy.
- Persist the scheduling intent, not a resolved UTC timestamp.
- Reconcile scheduled notifications on launch, on timezone change, and on data edit.
- Respect the platform's pending-notification cap with a rolling window.
- Support multiple lead times per entry.
I hit all of these building BDVibes, a birthday and anniversary reminder app for iOS with configurable lead times and on-device storage. If you have a better answer for February 29 than 'pick one and document it', I would like to hear it.
Top comments (1)
Really strong breakdown, Rizwan — the line that a same-day reminder tells you you've already failed is the sharpest one here, and it's the reason your lead-time table is the real product, not the scheduling.
On your February 29 question: I'd skip the global policy and let the contact decide at entry time. Leap-day people usually have a strong feeling about whether they celebrate on the 28th or March 1st, so storing a per-contact preference turns a policy argument into data — and it fits your schema, since you already store month/day separately from year. You'd still need a default for imports, but the user never has to argue with it.
One thing I'd watch closest is item 4 on your checklist, the reconcile on timezone change. The intent model is right — the 14th, local time, wherever they are — but the reconcile only helps if it actually runs before the next notification fires. What triggers it in BDVibes when the user lands in a new timezone and doesn't open the app?