lib/tzinfo/time_or_datetime.rb in tzinfo-1.2.7 vs lib/tzinfo/time_or_datetime.rb in tzinfo-1.2.8

- old
+ new

@@ -158,9 +158,20 @@ else to_time.mday end end alias :day :mday + + # Returns the day of the week (0..6 for Sunday to Saturday). + def wday + if @time + @time.wday + elsif @datetime + @datetime.wday + else + to_time.wday + end + end # Returns the hour of the day (0..23). def hour if @time @time.hour