Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add floor and ceiling #78

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add floor and ceiling #78

wants to merge 4 commits into from

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