aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/date
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/date')
-rw-r--r--activesupport/lib/active_support/core_ext/date/acts_like.rb2
-rw-r--r--activesupport/lib/active_support/core_ext/date/blank.rb2
-rw-r--r--activesupport/lib/active_support/core_ext/date/calculations.rb12
-rw-r--r--activesupport/lib/active_support/core_ext/date/conversions.rb20
-rw-r--r--activesupport/lib/active_support/core_ext/date/zones.rb4
5 files changed, 20 insertions, 20 deletions
diff --git a/activesupport/lib/active_support/core_ext/date/acts_like.rb b/activesupport/lib/active_support/core_ext/date/acts_like.rb
index cd90cee236..46fe99ad47 100644
--- a/activesupport/lib/active_support/core_ext/date/acts_like.rb
+++ b/activesupport/lib/active_support/core_ext/date/acts_like.rb
@@ -1,4 +1,4 @@
-require 'active_support/core_ext/object/acts_like'
+require "active_support/core_ext/object/acts_like"
class Date
# Duck-types as a Date-like class. See Object#acts_like?.
diff --git a/activesupport/lib/active_support/core_ext/date/blank.rb b/activesupport/lib/active_support/core_ext/date/blank.rb
index 71627b6a6f..edd2847126 100644
--- a/activesupport/lib/active_support/core_ext/date/blank.rb
+++ b/activesupport/lib/active_support/core_ext/date/blank.rb
@@ -1,4 +1,4 @@
-require 'date'
+require "date"
class Date #:nodoc:
# No Date is blank:
diff --git a/activesupport/lib/active_support/core_ext/date/calculations.rb b/activesupport/lib/active_support/core_ext/date/calculations.rb
index d589b67bf7..5cc4e936cd 100644
--- a/activesupport/lib/active_support/core_ext/date/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/date/calculations.rb
@@ -1,9 +1,9 @@
-require 'date'
-require 'active_support/duration'
-require 'active_support/core_ext/object/acts_like'
-require 'active_support/core_ext/date/zones'
-require 'active_support/core_ext/time/zones'
-require 'active_support/core_ext/date_and_time/calculations'
+require "date"
+require "active_support/duration"
+require "active_support/core_ext/object/acts_like"
+require "active_support/core_ext/date/zones"
+require "active_support/core_ext/time/zones"
+require "active_support/core_ext/date_and_time/calculations"
class Date
include DateAndTime::Calculations
diff --git a/activesupport/lib/active_support/core_ext/date/conversions.rb b/activesupport/lib/active_support/core_ext/date/conversions.rb
index 6e3b4a89ce..983dd829f6 100644
--- a/activesupport/lib/active_support/core_ext/date/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/date/conversions.rb
@@ -1,19 +1,19 @@
-require 'date'
-require 'active_support/inflector/methods'
-require 'active_support/core_ext/date/zones'
-require 'active_support/core_ext/module/remove_method'
+require "date"
+require "active_support/inflector/methods"
+require "active_support/core_ext/date/zones"
+require "active_support/core_ext/module/remove_method"
class Date
DATE_FORMATS = {
- :short => '%d %b',
- :long => '%B %d, %Y',
- :db => '%Y-%m-%d',
- :number => '%Y%m%d',
+ :short => "%d %b",
+ :long => "%B %d, %Y",
+ :db => "%Y-%m-%d",
+ :number => "%Y%m%d",
:long_ordinal => lambda { |date|
day_format = ActiveSupport::Inflector.ordinalize(date.day)
date.strftime("%B #{day_format}, %Y") # => "April 25th, 2007"
},
- :rfc822 => '%d %b %Y',
+ :rfc822 => "%d %b %Y",
:iso8601 => lambda { |date| date.iso8601 }
}
@@ -65,7 +65,7 @@ class Date
# Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005"
def readable_inspect
- strftime('%a, %d %b %Y')
+ strftime("%a, %d %b %Y")
end
alias_method :default_inspect, :inspect
alias_method :inspect, :readable_inspect
diff --git a/activesupport/lib/active_support/core_ext/date/zones.rb b/activesupport/lib/active_support/core_ext/date/zones.rb
index d109b430db..da23fe4892 100644
--- a/activesupport/lib/active_support/core_ext/date/zones.rb
+++ b/activesupport/lib/active_support/core_ext/date/zones.rb
@@ -1,5 +1,5 @@
-require 'date'
-require 'active_support/core_ext/date_and_time/zones'
+require "date"
+require "active_support/core_ext/date_and_time/zones"
class Date
include DateAndTime::Zones