lib/tzinfo/definitions/Asia/Kabul.rb in tzinfo-0.2.2 vs lib/tzinfo/definitions/Asia/Kabul.rb in tzinfo-0.3.0
- old
+ new
@@ -1,14 +1,20 @@
-require 'tzinfo/timezone'
+require 'tzinfo/timezone_definition'
+
module TZInfo
-module Definitions #:nodoc:
-module Asia #:nodoc:
-class Kabul < Timezone #:nodoc:
-setup
-set_identifier('Asia/Kabul')
-add_unbounded_start_period {TimezonePeriod.new(nil,DateTime.new0(Rational.new!(2170231477,900),0,Date::ITALY),16608,0,:LMT)}
-add_period(1889,12) {TimezonePeriod.new(DateTime.new0(Rational.new!(2170231477,900),0,Date::ITALY),DateTime.new0(Rational.new!(7294369,3),0,Date::ITALY),14400,0,:AFT)}
-add_period(1944,12) {TimezonePeriod.new(DateTime.new0(Rational.new!(7294369,3),0,Date::ITALY),nil,16200,0,:AFT)}
-end
-end
-end
+ module Definitions
+ module Asia
+ module Kabul
+ include TimezoneDefinition
+
+ timezone 'Asia/Kabul' do |tz|
+ tz.offset :o0, 16608, 0, :LMT
+ tz.offset :o1, 14400, 0, :AFT
+ tz.offset :o2, 16200, 0, :AFT
+
+ tz.transition 1889, 12, :o1, 2170231477, 900
+ tz.transition 1944, 12, :o2, 7294369, 3
+ end
+ end
+ end
+ end
end