diff --git a/lib/ice_cube/occurrence.rb b/lib/ice_cube/occurrence.rb index 4c51f962..4cd849f5 100644 --- a/lib/ice_cube/occurrence.rb +++ b/lib/ice_cube/occurrence.rb @@ -86,7 +86,7 @@ def to_time # def to_s(format = nil) if format && to_time.public_method(:to_s).arity != 0 - t0, t1 = start_time.to_s(format), end_time.to_s(format) + t0, t1 = start_time.to_formatted_s(format), end_time.to_formatted_s(format) else t0, t1 = start_time.to_s, end_time.to_s end diff --git a/spec/examples/occurrence_spec.rb b/spec/examples/occurrence_spec.rb index 80c18421..45f320ff 100644 --- a/spec/examples/occurrence_spec.rb +++ b/spec/examples/occurrence_spec.rb @@ -28,7 +28,7 @@ time_now = Time.current occurrence = Occurrence.new(time_now) - expect(occurrence.to_s(:short)).to eq time_now.to_s(:short) + expect(occurrence.to_formatted_s(:short)).to eq time_now.to_formatted_s(:short) end end