tod 1.5.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +0,0 @@
1
- class Date
2
- # Returns a local Time instance with this date and time_of_day
3
- # Pass in time_zone to use ActiveSupport::TimeZone
4
- def at(time_of_day, time_zone=Tod::TimeOfDay.time_zone)
5
- time_zone.local year, month, day, time_of_day.hour, time_of_day.minute, time_of_day.second
6
- end
7
-
8
- def to_time_of_day
9
- TimeOfDay.new hour, minute, second
10
- end
11
- end
@@ -1,5 +0,0 @@
1
- class Time
2
- def to_time_of_day
3
- TimeOfDay.new hour, min, sec
4
- end
5
- end
@@ -1,12 +0,0 @@
1
- # This test depends on not having ActiveSupport loaded yet. So it is named
2
- # with AAA prefix to ensure it runs before anything that loads it.
3
-
4
- require File.expand_path(File.join(File.dirname(__FILE__),'..','test_helper'))
5
-
6
- class AAATimeOfDayWithoutActiveSupportTest < Test::Unit::TestCase
7
- context "self.time_zone" do
8
- should "be Time" do
9
- assert_equal Time, TimeOfDay.time_zone
10
- end
11
- end
12
- end