diff options
author | Christoph <christoph@mixxt.net> | 2015-11-05 11:20:00 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2015-11-11 07:08:20 +0100 |
commit | 9ccb341fbf1ae1bb46a0f638bf35a4bcffe06297 (patch) | |
tree | b44af5165fe4f6255e70abc1cc672adfdd1bc83f /actionview/lib | |
parent | cff8b4951fd337075bd6079fa1a679428312baad (diff) | |
download | rails-9ccb341fbf1ae1bb46a0f638bf35a4bcffe06297.tar.gz rails-9ccb341fbf1ae1bb46a0f638bf35a4bcffe06297.tar.bz2 rails-9ccb341fbf1ae1bb46a0f638bf35a4bcffe06297.zip |
Fix week_field returning invalid value
According to the W3 spec[1] the value should use a 1-based index
and not a 0-based index for the week number.
[1]: http://www.w3.org/TR/html-markup/datatypes.html#form.data.week
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/helpers/tags/week_field.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/tags/week_field.rb b/actionview/lib/action_view/helpers/tags/week_field.rb index 5b3d0494e9..835d1667d7 100644 --- a/actionview/lib/action_view/helpers/tags/week_field.rb +++ b/actionview/lib/action_view/helpers/tags/week_field.rb @@ -5,7 +5,7 @@ module ActionView private def format_date(value) - value.try(:strftime, "%Y-W%W") + value.try(:strftime, "%Y-W%V") end end end |