2015/11/10分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Minor fix in Module#mattr_reader documentation
activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
のdocの修正です。
Module#mattr_reader
メソッドのdocのグラマーの修正を行っています。
Fix week_field returning invalid value
actionview/lib/action_view/helpers/tags/week_field.rb
の修正です。
week_field
メソッドでinputタグを生成する際、strftime
の引数に%W
を使用していたのを、%V
を使用するよう修正しています
- value.try(:strftime, "%Y-W%W") + value.try(:strftime, "%Y-W%V")
%W
は最初の数字が0
になっているのですが、W3 spec(Data types (common microsyntaxes) - HTML5)には、1以上の数字を指定するよう定義されており、0だと不味いので1スタートになるよう%V
を使用するよう修正しています。
%W
と%V
の違いは、下記のようになっています。
Week number: %W - Week number of the year. The week starts with Monday. (00..53) ISO 8601 week-based year and week number: %V - Week number of the week-based year (01..53)
知らなかったです。