Skip to content

Add floor and ceiling#78

Open
SharkBeard wants to merge 4 commits into
jackc:masterfrom
SharkBeard:master
Open

Add floor and ceiling#78
SharkBeard wants to merge 4 commits into
jackc:masterfrom
SharkBeard:master

Conversation

@SharkBeard

Copy link
Copy Markdown

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

jackc commented Jan 9, 2021

Copy link
Copy Markdown
Owner

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