aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 68585e8273..10c3543d6e 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -153,6 +153,12 @@ module ActiveSupport
alias_method :mday, :day
alias_method :month, :mon
+ %w(sunday? monday? tuesday? wednesday? thursday? friday? saturday?).each do |name|
+ define_method(name) do
+ time.__send__(name)
+ end
+ end unless RUBY_VERSION < '1.9'
+
def to_a
time.to_a[0, 8].push(dst?, zone)
end