Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ice_cube/occurrence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/examples/occurrence_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down