0
Can some one help me with an hour to minute converter
The current time is 10:30 PM and I need to set an alarm clock at 6:00 AM, I have to set the timer in minutes though. I have made the script extremely simple, but I feel like there could be a better way to make it? https://code.sololearn.com/c8pNchwp6Xla/?ref=app
1 Réponse
+ 1
I would try this:
How many minutes to you need to get the next full hour? (60 - minutes of current time)
In your case 30 minutes. (11:00)
How many hours from 11 to 6 (12 - hour of new current time + hour of alarm clock) --> 7 (because its p.m.)
7*60 + 30 = 450