lib/tzinfo/definitions/Pacific/Kwajalein.rb in tzinfo-0.2.2 vs lib/tzinfo/definitions/Pacific/Kwajalein.rb in tzinfo-0.3.0
- old
+ new
@@ -1,15 +1,22 @@
-require 'tzinfo/timezone'
+require 'tzinfo/timezone_definition'
+
module TZInfo
-module Definitions #:nodoc:
-module Pacific #:nodoc:
-class Kwajalein < Timezone #:nodoc:
-setup
-set_identifier('Pacific/Kwajalein')
-add_unbounded_start_period {TimezonePeriod.new(nil,DateTime.new0(Rational.new!(1304307919,540),0,Date::ITALY),40160,0,:LMT)}
-add_period(1900,12) {TimezonePeriod.new(DateTime.new0(Rational.new!(1304307919,540),0,Date::ITALY),DateTime.new0(Rational.new!(58571881,24),0,Date::ITALY),39600,0,:MHT)}
-add_period(1969,9) {TimezonePeriod.new(DateTime.new0(Rational.new!(58571881,24),0,Date::ITALY),745848000,-43200,0,:KWAT)}
-add_period(1993,8) {TimezonePeriod.new(745848000,nil,43200,0,:MHT)}
-end
-end
-end
+ module Definitions
+ module Pacific
+ module Kwajalein
+ include TimezoneDefinition
+
+ timezone 'Pacific/Kwajalein' do |tz|
+ tz.offset :o0, 40160, 0, :LMT
+ tz.offset :o1, 39600, 0, :MHT
+ tz.offset :o2, -43200, 0, :KWAT
+ tz.offset :o3, 43200, 0, :MHT
+
+ tz.transition 1900, 12, :o1, 1304307919, 540
+ tz.transition 1969, 9, :o2, 58571881, 24
+ tz.transition 1993, 8, :o3, 745848000
+ end
+ end
+ end
+ end
end