aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time/conversions.rb
diff options
context:
space:
mode:
authorAlexey Gaziev <alex.gaziev@gmail.com>2012-04-29 01:13:04 +0400
committerAlexey Gaziev <alex.gaziev@gmail.com>2012-04-29 03:12:07 +0400
commit432a65fab2a6c7eb6ff77062e73f7627470f7da7 (patch)
treeeb4bffc76ae1d5a6fba081d34f57680e4df8ecaa /activesupport/lib/active_support/core_ext/time/conversions.rb
parentf1220516fba3add0f3b491a440fd6525fdb61587 (diff)
downloadrails-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.rb12
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]