Live data from Hacker News

Ask HN: Did you encounter any leap year bugs today?

news.ycombinator.com

411–420 of 498 posts

Re: Ask HN: Did you encounter any leap year bugs today?

#411
post #231

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…

Google is now outsourcing development to low cost countries. They dont care about quality much

Re: Ask HN: Did you encounter any leap year bugs today?

#412

Earlier quoted context omitted.

I mean, they could have paid it any day before then, right? I would have just gone on the 28th and be done with it.

Let me tell you about this human trait called procrastination.... actually I just have to do something first

Pay By = Wait Until

Re: Ask HN: Did you encounter any leap year bugs today?

#413

My 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.

Well it is human error after all. By the programmers. Oe those who invented the complicated calendar

Re: Ask HN: Did you encounter any leap year bugs today?

#414

Earlier quoted context omitted.

So make it more precise. DOB + n * 365.2421.

365.2425

365.2421 is more correct.

Nasa explains:

365 +0.25 - 0.01 + 0.0025 - 0.00025 = 365.24225

https://pumas.nasa.gov/examples/how-many-days-are-year

Re: Ask HN: Did you encounter any leap year bugs today?

#416
I have a small hobby project that scrapes concerts on various venues websites.

Many 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?

#417
post #268

Earlier 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.

No we should move our birthday celebration up by 6 hours every year. But that would be only relevant if we were celebrating at the exact hour of our birth.

Re: Ask HN: Did you encounter any leap year bugs today?

#419
post #394

I 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…

In .NET there is an AddYears function that deals with all of this, and even gives you Feb 29 if the date is valid, otherwise Feb 28: https://learn.microsoft.com/en-us/dotnet/api/system.datetime...

Re: Ask HN: Did you encounter any leap year bugs today?

#420
Today is the start of the new tax year here in South Africa and my brother wanted to draw the last years worth of transactions from a local financial institution to be able declare his tax.

Setting 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.

Post reply on HN