Live data from Hacker News

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

news.ycombinator.com

161–170 of 498 posts

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

#161
post #108
post #100

Earlier quoted context omitted.

That makes it weird though, because 1900 was a leap year? I sort of get it, but it's a slightly odd and inconsistent decision. Edit: no it's not, it's absolutely correct, leap years just aren't as simple as I thought!

1900 was not a leap year... It's 0 mod 4, yes, but it's 0 mod 100 and not 0 mod 400

Yep, thanks, I just wasn't aware of the latter rule at all. Time to re-read Falsehoods perhaps!

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

#162

The other way around! Today a few services that don't congratulate me on my birthday (on non-leap years) did. I was born on February 29th.

...it occurs to me, when should those services congratulate you? Should it be on February 28 or March 1?

365 days ago was March 1, 2023

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

#163
post #156
post #23

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

How do leap day birthdays get handled in general? How is the right age iterated every year?

The most common approach I’ve seen is to alias them to Mar 1st.

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

#164
post #103

We have a product that uses ChatGPT via the API, using the 3.5 turbo version. Our query involves some dates. Instead of giving back text like it usually does, today it has been giving errors because it does not think 2024-02-29 is a valid date. This is easy to reproduce with the web interface, at least sometimes [0]. It start out by saying it's not a valid date and then as it's explaining why it isn't it realizes its…

Wired: LLM are practically AGI Tired: ChatGPT thinks February 29th isn't a valid date.

That's because it's trained on 2021 data. No February 29 back then!

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

#165

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…

Fascinating. I presume you were born on Feb 29 of 2004 or earlier. What did the system do when you tried to purchase? I'm curious how the error manifested. Thanks.

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

#166
post #94

Our ETL process is heavily monitored so we never miss a days data, but we got a surprising error "cant build aggregates - missing data, aborting MV refresh, data will be a day old". It was the year to date (YTD) calculation - no data for 29/2/2023 to compare to today.

This is why -365 days can be better than -1y.

Until tomorrow when your system is now off by a day for the next 365 days.

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

#167

Yes, I have a bot that posts daily San Francisco weather records to Mastodon. It did not post as scheduled today. This is because I am looking at all the high temperatures, low temperatures, and precipitation on today's date from 1875 (about as far back as there are digitized weather records I can work with) to the present. Since there was no such date as February 29, 1875 it is throwing an error.

I just dont get the “daily” weather records thing. Meteorologists talk about them constantly but theyre completely meaningless right? who cares what this particular day of the year highs were? its just noise! at least do it on a weekly resolution instead but even that seems so noisy itd be meaningless.

sorry, this has nothing to do with you, just a pet peeve.

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

#168

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…

So you're paying them to not fix a bug in their system, am I reading that right?

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

#169

Our credit card invoice system shifted all invoices that were due 28th to the 29th of February. Still trying to figure out what happened.

Are they monthly invoices? Most billing systems will bill monthly recurring bills that have an anniversary of 28, 29, 30, or 31 on Feb 28. Maybe your system was actually doing the right thing and putting only 29, 30, and 31 on Feb 29.

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

#170

Earlier quoted context omitted.

I'm sure it's more complicated than "we didn't think about leap years", but it certainly sounds pretty amateurish. Old programmer rant: In my day, we fixed the Y2K bug - we went to the future and back several times a day!

In your day people weren't doing everything with string ops in JavaScript.

Oh, the progress we've made!
Post reply on HN