I’m working on a proposed refactoring of to_formatted_s in the Date, Time and DateTime core extenstions in ActiveSupport.
I’m wondering if anyone can explain what the conditional is for here… https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/date_time/conversions.rb#L40
I’ve traced it’s existence back to this commit from Jeremy in 2008 but the commit message is a bit Greek to me. https://github.com/rails/rails/commit/047db112991785d871e9a6ba165b93752b0fff06
There’s nearly identical code in the Date and Time extensions, but only the DateTime extension includes this mystery condition. Any insights?