Proposal for new instance methods upto and/or step
These can be used as following cases
Tod::TimeOfDay('10:00').upto(Tod::TimeOfDay('11::00')) do |tod|
puts tod
end
#=> 10:00::00, 10:00:01, 10:00:02, ...10:59:59, 11:00:00
Tod::TimeOfDay('10:00').step(Tod::TimeOfDay('11::00'), 60) do |tod|
puts tod
end
#=> 10:00, 10:01, 10:02, ...10:59, 11:00
c.f.
https://rubydoc.info/stdlib/date/Date#step-instance_method
https://rubydoc.info/stdlib/date/Date#upto-instance_method
before working on implementation, I would like to hear a comment about this methods. Thank you!