diff options
author | Christoph <christoph@mixxt.net> | 2015-11-05 11:20:00 +0100 |
---|---|---|
committer | Andrew White <andrew.white@unboxedconsulting.com> | 2015-11-10 12:28:47 +0000 |
commit | 60dabb156f2aa2c22bb2862145f80c64ba12cea5 (patch) | |
tree | c47d5e6786951a542ce78158ce43c69260cd961b /actionview/lib/action_view/helpers | |
parent | 8d7f0a66c623aa294039032e9e928e88cf3db956 (diff) | |
download | rails-60dabb156f2aa2c22bb2862145f80c64ba12cea5.tar.gz rails-60dabb156f2aa2c22bb2862145f80c64ba12cea5.tar.bz2 rails-60dabb156f2aa2c22bb2862145f80c64ba12cea5.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/action_view/helpers')
-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 |