Oh well, another day, another data point in favor of "the fact that computers run at all is a miracle"
Top-level
Oh well, another day, another data point in favor of "the fact that computers run at all is a miracle" 9 comments
So I guess the most correct thing to say is that there is no test coverage for historical time in Ruby (this matters because time zones change over time so if you are trying to make accurate comparison across years and especially decades this will come into play) @darius https://github.com/kdeldycke/awesome-falsehood#dates-and-time @darius When you study Ruby's code, perhaps use git blame to check for last change and jump from the commit to a PR to gather more context. Might have a good reason why they didn't invest more effort into this part of the codebase. @RyunoKi the history of basically all the tests are all clobbered by this commit -- it seems like they haven't really been touched in well over 5 years, I'd have to go back to some previous repository in order to find relevant commits @darius @RyunoKi using NodaTime (the library used as a reference in this post) completely changed my perspective on working with datetimes and also now makes me very angry about every language's datetime stdlib which all seemed designed to maximize footguns. The end result is programmers learn "datetimes are scary" instead of "this stdlib sucks" |
Wait I stand corrected! There are some tests, they are in Time and not DateTime. But also the ruby docs point out that there are actual differences between the two if you are calculating historical time
https://github.com/ruby/ruby/blob/d92f09a5eea009fa28cd046e9d0eb698e3d94c5c/spec/ruby/library/time/shared/rfc2822.rb