Ask HN: Did you encounter any leap year bugs today?
301–310 of 498 posts
Re: Ask HN: Did you encounter any leap year bugs today?
#302Re: Ask HN: Did you encounter any leap year bugs today?
#303Earlier 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!
It does sound amateurish eh? I do most of my business logic inside Microsoft SQL Server Stored Procedure, and MS SQL just takes care of date pretty well. But then, come to think of it, you don't need to use SQL to have good date logic. C# and Java both have excellent date handing libraries. I don't know about C++, but I'd be surprised if there was not a modern date library for C++, so I am of the opinion there should…
The standard library now includes . AFAIK: It was mostly written by Howard Hinnant. He now has more date/time libs that expand upon : https://github.com/HowardHinnant/date
Re: Ask HN: Did you encounter any leap year bugs today?
#304Re: Ask HN: Did you encounter any leap year bugs today?
#305> A number of New Zealand petrol pumps stopped working on Thursday due to a "leap year glitch" in payment software, fuel stations and the payment service provider said. https://www.reuters.com/world/asia-pacific/leap-year-glitch-...
Re: Ask HN: Did you encounter any leap year bugs today?
#306The Casio F-91W doesn’t account for the year, it showed today’s date as Thursday, March 1st.
Re: Ask HN: Did you encounter any leap year bugs today?
#307Earlier quoted context omitted.
Even if it sees tokens, I don't think it's an impossible task. Certainly an advanced enough LLM should be able to decipher token meanings, to know that a word is made up of the individual character tokens regardless of how the full word is tokenized. Maybe something gpt5 can do (or there's some real technical limitation which I don't understand)
> to know that a word is made up of the individual character tokens A token is the smallest unit, it's not made of further tokens. It maps to a number.
Re: Ask HN: Did you encounter any leap year bugs today?
#308Earlier quoted context omitted.
Is March more logical? Feb 29 + 1 year = Feb 28.
What’s the significance of 365? Each Earth year has just a smidge under 365.25 days.
If you want to celebrate your birthday at the moment earth reaches the same spot around the sun as when you were born, then we’d all have the same issue - we’d have to celebrate it 6 hours later every year, reseting every 4 years.
February 29 is very much a new day… which simply doesn’t exist on non-leap years.
Re: Ask HN: Did you encounter any leap year bugs today?
#309Earlier quoted context omitted.
365 days is what people commonly think of as a year. So if you're born Feb 29th and celebrate your birthday one year later (whether you call that 365 or 365.25), you land on Feb 28th. Then again, folks born between Jan 1 and Feb 28th of a leap year celebrate their birthdays 366 days later by calendar days. Anyway, I'm not sure there's any more or less logical date to use and Feb 29th babies seem to choose both about…
Celebrating on the 28th makes no sense. That is when you celebrate your Birthday Eve every year so your birthday is the next day, whatever that is.
Re: Ask HN: Did you encounter any leap year bugs today?
#310Earlier quoted context omitted.
Even if it sees tokens, I don't think it's an impossible task. Certainly an advanced enough LLM should be able to decipher token meanings, to know that a word is made up of the individual character tokens regardless of how the full word is tokenized. Maybe something gpt5 can do (or there's some real technical limitation which I don't understand)
> to know that a word is made up of the individual character tokens A token is the smallest unit, it's not made of further tokens. It maps to a number.
{the:1, t: 2, h:3, e:4}
There should be somewhere in the corpus, "the is spelled t h e" that this system can use to pull this out. We can ask gpt to spell out individual words in NATO phonetic and see how it does.