We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f70662a commit 1050f5dCopy full SHA for 1050f5d
Sprint-2/5-stretch-extend/format-time.js
@@ -21,11 +21,14 @@ function formatAs12HourClock(time) {
21
22
if (hours == 0 || hours == 24) {
23
return `12:${pad(minutes)} am`;
24
- } else if (hours > 12) {
+ }
25
+ if (hours > 12) {
26
return `${pad(hours - 12)}:00 pm`;
- } else if (hours == 12) {
27
28
+ if (hours == 12) {
29
return `${time} pm`;
- } else return `${time} am`;
30
31
+ return `${time} am`;
32
}
33
34
let currentOutput = formatAs12HourClock("08:00");
0 commit comments