-
-
Notifications
You must be signed in to change notification settings - Fork 94
ITP JAN 25 | Katarzyna Kazimierczuk | Data Groups | Sprint 3 - alarmclock #503
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've managed to get the timer counting down to an alarm, so well done! There are a few things missing, such as following the requirement that entering 10
turns into 00:10
(i.e. counts down ten seconds). Also it would be good to be able to cancel existing alarms that are set - i.e. if you set a new alarm it should cancel any existing alarm. It does work OK in the simple case though (if I type in 00:00:10
as the input).
}; | ||
|
||
//parse time to a format we can work with | ||
const splitAndParseTime = (userInput) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that the requirements here were to include an hours column - it looks like it's just minutes and seconds, in an MM:SS format.
}; | ||
|
||
// format single digit time and return as an object | ||
const formattedTime = (hours, minutes, seconds) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a reasonable way to model a time given how we are modelling it.
No description provided.