-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
I was surprised to find that a duration is represented with a Tod::TimeOfDay. This seems semantically incorrect. It seems it should be either some sort of new class representing a period of time or just a float representing seconds, as is done in other libraries.
Would you be open to changing this behavior for the next major version release?
> noon = Tod::TimeOfDay.new(12)
> afternoon = Tod::TimeOfDay.new(14)
> d = afternoon-noon
=> #<Tod::TimeOfDay:0x0000000559f038 @hour=2, @minute=0, @second=0, @second_of_day=7200>
> d.to_i / 60 / 60
=> 2
hirokishirai
Metadata
Metadata
Assignees
Labels
No labels