lib/tzinfo/definitions/America/St_Lucia.rb in tzinfo-0.2.2 vs lib/tzinfo/definitions/America/St_Lucia.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 America #:nodoc:
-class St_Lucia < Timezone #:nodoc:
-setup
-set_identifier('America/St_Lucia')
-add_unbounded_start_period {TimezonePeriod.new(nil,DateTime.new0(Rational.new!(868092721,360),0,Date::ITALY),-14640,0,:LMT)}
-add_period(1890,1) {TimezonePeriod.new(DateTime.new0(Rational.new!(868092721,360),0,Date::ITALY),DateTime.new0(Rational.new!(870984961,360),0,Date::ITALY),-14640,0,:CMT)}
-add_period(1912,1) {TimezonePeriod.new(DateTime.new0(Rational.new!(870984961,360),0,Date::ITALY),nil,-14400,0,:AST)}
-end
-end
-end
+ module Definitions
+ module America
+ module St_Lucia
+ include TimezoneDefinition
+
+ timezone 'America/St_Lucia' do |tz|
+ tz.offset :o0, -14640, 0, :LMT
+ tz.offset :o1, -14640, 0, :CMT
+ tz.offset :o2, -14400, 0, :AST
+
+ tz.transition 1890, 1, :o1, 868092721, 360
+ tz.transition 1912, 1, :o2, 870984961, 360
+ end
+ end
+ end
+ end
end