3 ms·
> 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 sam
by DinaCoder99 3y ago
> 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_toad 3y agoIt’s probably comparing the number of days between the dates with the number of days in a year, which would usually work.
- EnigmaticLion 3y agoSource is a lot more complicated than i thought it will be: https://github.com/rails/rails/blob/v6.1.7.7/actionview/lib/action_view/helpers/date_helper.rb#L95 https://github.com/rails/rails/blob/v6.1.7.7/actionview/lib/...