Age-gated flows fail in narrow places: the day before a birthday, the leap day, the timezone boundary. Setting a tight age range here produces a batch clustered right against whatever threshold you are testing.
What you can control
- Set the minimum and maximum age and every row lands inside it, calculated from today rather than a fixed year.
- Five output formats, including Unix timestamps for anything that stores dates as integers.
- The calculated age column accounts for whether the birthday has passed this year — the off-by-one that most age code gets wrong.
- Narrow the range to a single year to stress-test an eligibility boundary.
Testing ideas
- Age thresholds. Set the minimum and maximum age to your rule (18, 21, 65) and check the boundary days: the day before and the day of a birthday.
- Leap-day birthdays. Look for 29 February births and confirm age calculation does not crash or skip a year in non-leap years.
- Formats. Generate US and European formats together.
03/04/1990is 4 March in one and 3 April in the other. - Unix timestamps. Dates before 1970 are negative timestamps. Older birthdays find code that assumes they are positive.
What this is not
Ages are calculated in UTC. A user near a date boundary in another timezone may be a day older or younger than the column says, which is itself a bug worth reproducing.