Repository navigation
London | 26-ITP-Sep | Mandip Sanger | Sprint 1 | formatAs12HourClock - #1767
Open
mandipsanger wants to merge 1 commit into
Open
mandipsanger wants to merge 1 commit into
mandipsanger wants to merge 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Poonam-raj
reviewed
Nov 3, 2026
| const minutes = time.slice(3); | ||
|
|
||
| const hours = Number(time.slice(0, 2)); | ||
| const period = hours >= 12 ? "pm" : "am"; |
Contributor
There was a problem hiding this comment.
Good use of the ternary operator!
Poonam-raj
reviewed
Nov 3, 2026
Contributor
There was a problem hiding this comment.
Great test cases, good edge case work here. As a stretch - how could "bad" behaviours be tested here? What could go wrong with this function? How could we test that?
Poonam-raj
reviewed
Nov 3, 2026
Poonam-raj
left a comment
Contributor
There was a problem hiding this comment.
Great work, some nice logic going in. I've left a stretch comment around how we check for things that can go wrong in a function. Have a think.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Task code
CYF-1197
Replace this line with the Task code (e.g. CYF-0000).
Changelist
format clock edge cases
Briefly explain your PR.
Edgecase