Skip to content

Conversation

@SharkBeard
Copy link

Add floor and ceiling methods to TimeOfDay. This is useful for scheduling things at specific time intervals after doing arithmetic. For example to only schedule things in 15-minute increments.

@jackc
Copy link
Owner

jackc commented Jan 9, 2021

Did you maybe forget to commit something? A test is failing:

  1) Error:
TimeOfDay::round_nearest#test_0001_rounds to the given nearest number of seconds:
NameError: undefined local variable or method `round_sec' for #<Tod::TimeOfDay:0x00007fe0c29ab5c8>
Did you mean?  round
    /Users/jack/dev/tod/lib/tod/time_of_day.rb:75:in `floor'
    /Users/jack/dev/tod/lib/tod/time_of_day.rb:85:in `round'
    /Users/jack/dev/tod/test/tod/time_of_day_test.rb:129:in `block (3 levels) in <top (required)>'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants