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

Earlier comments
zeroCalories2 replies#
Remember, always use a library for cryptography, payments, and date calculations.
interbased1 reply#
Yup. I use the datetime module in Python and didn’t need to do anything extra.
lobsterthief#
For JavaScript, it’s `date-fns` for me
iknowbettah1 reply#
wrong! always roll your own crypto!
rfl890#
Get a load of this guy.
EnigmaticLion1 reply#
We have a rails 6 app, and there's a test that essentially expects time_ago_in_words(1.year.from_now) to return "about 1 year" (as part of a user facing message). The test failed. I thought it's a flaky test but i was able to reproduce it locally. Turns out executing that code on a leap day returns "almost 1 year" instead. Can test it in rails console if you are interested:

  irb(main):001:0> include ActionView::Helpers::DateHelper
  => Object
  irb(main):002:0> distance_of_time_in_words(Date.new(2025, 2, 28), Date.new(2024, 2, 29))
  => "almost 1 year"
  irb(main):003:0> distance_of_time_in_words(Date.new(2025, 3, 1), Date.new(2024, 2, 29))
  => "about 1 year"
  irb(main):004:0> distance_of_time_in_words(Date.new(2025, 2, 28), Date.new(2024, 2, 28))
  => "about 1 year"
DinaCoder991 reply#
> distance_of_time_in_words(Date.new(2025, 2, 28), Date.new(2024, 2, 28))

Curiously, this is also not quite a year, even though the days and months are the same.

mr_toad1 reply#
It’s probably comparing the number of days between the dates with the number of days in a year, which would usually work.
whatever12 replies#
Why this is not a global holiday? Let's all come together and agree to do nothing on this bonus day. Calendar Problems solved.
pizzafeelsright3 replies#
We should get it off work. We aren't getting paid for the extra day of work right?
whatever1#
Exactly. Off the books for everyone.
chgs#
No power, no hospitals, no internet, no phones, no care homes etc.
worksonmine#
Depends, some are paid by the hour.
IvyMike#
Even those "24/7/365" people technically agree, today is a day off.

Load more comments