Skip to content

Commit c8da88b

Browse files
committed
Fixed an issue in format-time.js
1 parent d377ac2 commit c8da88b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Sprint-2/5-stretch-extend/format-time.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function formatAs12HourClock(time) {
1717
hours = hours % 12;
1818
hours = hours ? hours : 12; // the hour '0' should be '12'
1919
minutes = minutes < 10 ? '0'+minutes : minutes;
20+
hours = hours < 10 ? '0'+hours : hours;
2021

2122
return `${hours}:${minutes} ${ampm}`
2223
}

0 commit comments

Comments
 (0)