lib/timing/zone_offset.rb in timing-0.0.5 vs lib/timing/zone_offset.rb in timing-0.0.6
- old
+ new
@@ -6,11 +6,11 @@
def initialize(seconds)
raise ArgumentError, "#{seconds} is not a number" unless seconds.is_a? Numeric
super
end
- def to_s
- "#{sign}#{hour.to_s.rjust(2, '0')}#{minute.to_s.rjust(2, '0')}"
+ def to_s(separator=nil)
+ "#{sign}#{hour.to_s.rjust(2, '0')}#{separator}#{minute.to_s.rjust(2, '0')}"
end
def iso8601
"#{sign}#{hour.to_s.rjust(2, '0')}:#{minute.to_s.rjust(2, '0')}"
end
\ No newline at end of file