> Any comments on why year 1 is used as the default?  This appears to have been 
> made as the choice 9 or so years ago.  It's an easy change, but it'd be nice 
> to hear a reason why 1 has been used as the default before I open a new PR.


It looks like it was https://github.com/rails/rails/pull/4641


>From context, I surmise that only date_select was particularly considered, 
>which would explain why it didn’t really matter what the default was, beyond 
>the fact it existed.



My possible concerns around changing this are:

* existing callers, especially of a (more common?) year-ignoring date_select, 
may be relying on the current value

* making the default a value that changes over time seems to risk future 
surprises


Tying in with the latter, I’d generally advise against doing TZ math on a 
datetime whose year you don’t know / is undefined. If your use case means you 
know it’s definitely the current year, you probably want to be explicit about 
that, and not rely on a default anyway.


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to