diff options
author | Alexey Gaziev <alex.gaziev@gmail.com> | 2012-04-29 01:13:04 +0400 |
---|---|---|
committer | Alexey Gaziev <alex.gaziev@gmail.com> | 2012-04-29 03:12:07 +0400 |
commit | 432a65fab2a6c7eb6ff77062e73f7627470f7da7 (patch) | |
tree | eb4bffc76ae1d5a6fba081d34f57680e4df8ecaa /activesupport/lib/active_support/core_ext/time/conversions.rb | |
parent | f1220516fba3add0f3b491a440fd6525fdb61587 (diff) | |
download | rails-432a65fab2a6c7eb6ff77062e73f7627470f7da7.tar.gz rails-432a65fab2a6c7eb6ff77062e73f7627470f7da7.tar.bz2 rails-432a65fab2a6c7eb6ff77062e73f7627470f7da7.zip |
String quotes and trailing spaces
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time/conversions.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/time/conversions.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/conversions.rb b/activesupport/lib/active_support/core_ext/time/conversions.rb index f7e237912f..4f852fd780 100644 --- a/activesupport/lib/active_support/core_ext/time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/time/conversions.rb @@ -3,11 +3,11 @@ require 'active_support/values/time_zone' class Time DATE_FORMATS = { - :db => "%Y-%m-%d %H:%M:%S", - :number => "%Y%m%d%H%M%S", - :time => "%H:%M", - :short => "%d %b %H:%M", - :long => "%B %d, %Y %H:%M", + :db => '%Y-%m-%d %H:%M:%S', + :number => '%Y%m%d%H%M%S', + :time => '%H:%M', + :short => '%d %b %H:%M', + :long => '%B %d, %Y %H:%M', :long_ordinal => lambda { |time| day_format = ActiveSupport::Inflector.ordinalize(time.day) time.strftime("%B #{day_format}, %Y %H:%M") @@ -40,7 +40,7 @@ class Time # or Proc instance that takes a time argument as the value. # # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = "%B %Y" + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } def to_formatted_s(format = :default) if formatter = DATE_FORMATS[format] |