Lurker News
After a frantic scramble this morning, our billing team has finished patching a bug which erroneously was charging our monthly subscribers for an extra day.

All test suites are passing now, and SRE has scheduled a postmortem after the QA confirms the fix in 2028.

Comments (481) 159 threads

Show all comments

Showing thread 1 of 159

kccqzy4 replies#
Heard from a friend in China: the age calculation portion of the app to schedule a marriage certificate had a bug where they subtracted 22 (legal minimum age) from the year, which resulted in 2002-02-29 which doesn't exist. The app intends to compare this against the user's birth date. The error handling code assumes all errors are from the comparison. The app then rejected all marriage certificate appointments by complaining that the users are too young to marry legally.
chaorace1 reply#
Haha, that would be quite the appropriate place to put one of those "Please wait and try again" error messages.
tedajax1 reply#
"look, today the math just doesn't work out, try tomorrow"
Saigonautica1 reply#
This is often the result of consulting an astrologer in Asia for a marriage date, to be fair.

Continue this thread — 1 reply

xattt4 replies#
How do leap day birthdays get handled in general? How is the right age iterated every year?
ao98#
The most common approach I’ve seen is to alias them to Mar 1st.
DinaCoder991 reply#
Sadly, I can say from experience the American draft does not count the number of birthdays celebrated to figure out if you're eligible to serve.
qup4 replies#
You got drafted when you were five?

Continue this thread — 4 replies

paulddraper1 reply#
Both Feb 28 and Mar 1 are commonly used to celebrate birthdays.

AFAIK there is no firm convention. Feb is more natural ("My birthday is in February"), Mar is more logical (the 60th days of the year).

js27 replies#
Is March more logical? Feb 29 + 1 year = Feb 28.
jey4 replies#
What’s the significance of 365? Each Earth year has just a smidge under 365.25 days.

Continue this thread — 4 replies

silisili2 replies#
Think of it this way: if Feb 29 didn't exist that year, it would have been March 1.

If we're being scientific I guess all of us should move our birthday up by 1 day on leap years, but that seems annoying and not sure anyone really cares enough to.

Continue this thread — 2 replies

edflsafoiewq1 reply#
By this logic, all birthdays would slowly drift as leap years pass.
drdeca6 replies#
Take DOB + n * 365.25 and then pick whatever day that falls in? That way it shouldn’t drift overall. Though, I guess it would imply that what day of the year people celebrate on, would be off by one day on leap years compared to what it is on other years?

Continue this thread — 6 replies

runarberg1 reply#
I asked JavaScript:

    const { format } = Intl.DateTimeFormat("en-UK", { month: "short", day: "numeric" });

    const date = new Date(2024, 1, 29);
    console.log(format(date));
    // 29 Feb

    date.setYear(2025);
    console.log(format(date));
    // 1 Mar

    const year = 1000 * 60 * 60 * 24 * 365.2425;
    console.log(format(new Date(2024, 1, 29).getTime() + year));
    // 28 Feb
I guess both are logical by some definition of logic.

Continue this thread — 1 reply

paulddraper5 replies#
You're begging the question. [1]

"Feb 29 + 1 year" is verbatim restatement.
---
You can say Feb 29 + 365 days = Feb 28. (And Feb 29 + 730 days = Feb 27.)
---
EDIT:
Note that in the context of birthdays, people use "calendar years," not "unit of time which is ~1 revolution around the sun."
Birthdays aren't celebrated every X million seconds after the moment of birth.
They are celebrated the same day each calendar year -- notwithstanding the fuzzy concept of "same day" for incongruent calendar years. There's no singuar right answer, but that is the core question: "what is the same day next (calendar) year?"
[1] https://en.wikipedia.org/wiki/Begging_the_question

Continue this thread — 5 replies

Scarblac1 reply#
Feb 28 is definitely too early, you haven't lived a whole year yet since your birthday. So March 1 it is. It's not your birthday but you can celebrate having made it another year.

Continue this thread — 1 reply

usr1106#
Relevant question for driving, voting, marrying, drinking. I'd assume just the date is compared.

If you are born on 29th, on future 28th you are considered "too young", regardless whether a 29th exists or not. On future March 1st you are "old enough" again regardless.
If a 29th exists you are old enough already on that date. Drinking beer in Germany at 16, I guess in some countries at 20 could be relevant cases. For the more common minimum age of 18 for many things, the limit is reached always on March, 1st because a 29th cannot exist.

swasheck2 replies#
so … many bullets were dodged today
peteradio#
It's a leap year miracle!
DANmode#
Opinionated devs are the best devs.

Tell us about your last marriage?, lol

alphanumeric0#
This is why you use a datetime library.