We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Tod::TimeOfDay.new 7.5 rise error. Invalid value for Integer. How to be in this case? ,
The text was updated successfully, but these errors were encountered:
I'll assume your 7.5 refers to 7.5 hours. The constructor requires integer components for the time.
What you can do is convert your time to seconds and use .from_second_of_day.
.from_second_of_day
[5] pry(main)> Tod::TimeOfDay.from_second_of_day((7.5 * Tod::TimeOfDay::NUM_SECONDS_IN_HOUR).round) => #<Tod::TimeOfDay:0x00000001a085b0 @hour=7, @minute=30, @second=0, @second_of_day=27000>
Sorry, something went wrong.
No branches or pull requests
Tod::TimeOfDay.new 7.5 rise error. Invalid value for Integer. How to be in this case?
,
The text was updated successfully, but these errors were encountered: