Unless you're in your 70's, YouTube doesn't allow you to buy premium if you were born on a leap year, because their age calculation is broken, and it thinks you're under 18. Google One works fine. Support will suggest that you change the birthday on your Google account, which breaks account recovery processes that depend on you furnishing matching identity documentation. Mind-boggling. Because nobody at YouTube has a…
I wouldn't expect google to mess this up but then again someone probably calculated value produced vs project cost and tossed this one at the bottom of the pile 10 times already. 66/100k people (0.066%, close to the definition for a rare disease) would be born on 29th of feb on a uniform distribution, probably minus another 5% or so because february is in many places the least likely month to be born into. And out of…
Ask HN: Did you encounter any leap year bugs today?
411–420 of 498 posts
Re: Ask HN: Did you encounter any leap year bugs today?
#412Re: Ask HN: Did you encounter any leap year bugs today?
#413My wife’s company had an issue with this today. A couple hours before I read this she mentioned it to me and I just assumed human error was the cause. Then I read this and it clicked. Crazy shit.
Re: Ask HN: Did you encounter any leap year bugs today?
#414Earlier quoted context omitted.
So make it more precise. DOB + n * 365.2421.
365.2425
Nasa explains:
365 +0.25 - 0.01 + 0.0025 - 0.00025 = 365.24225
Re: Ask HN: Did you encounter any leap year bugs today?
#415Re: Ask HN: Did you encounter any leap year bugs today?
#416Many of the websites don't write out which the year the concert takes place, so in python I will: try the current year and see if the date has already passed, and in that case I try the next year.
Of course feb 29th is an issue in this case, so some of my scrapers modules crashed.
Re: Ask HN: Did you encounter any leap year bugs today?
#417Earlier quoted context omitted.
Is March more logical? Feb 29 + 1 year = Feb 28.
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.
Re: Ask HN: Did you encounter any leap year bugs today?
#418Re: Ask HN: Did you encounter any leap year bugs today?
#419I know I'm late to the party, but I have a Python script that creates a security.txt for one of my own project, and it sets the "Expires" date to one year in the future. Old code: expires = datetime.datetime.now(tz) expires = expires.replace(year=expires.year + 1) It broke yesterday, throws an exception ("ValueError: day is out of range for month"). It's kinda obvious that it does. Fixed version code: expires = datet…
Re: Ask HN: Did you encounter any leap year bugs today?
#420Setting the date range from 2023-03-01 to 2024-02-29 was not permitted as it says the date range must be within 12 months. Of course a general limit of 12 months is a bit of a WTF too.