Skip to content

output of subtraction and addition #40

@jjb

Description

@jjb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions