Skip to content

Commit 9ee2adf

Browse files
committed
clock changed too
1 parent 90091fd commit 9ee2adf

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

  • Sprint-1/2-mandatory-errors

Sprint-1/2-mandatory-errors/4.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
// the times are in the wrong places ie:-20:53 is not a twelve hour time and as they are const they cant be directly changed
77

8-
let twelveHourClockTime = "15.00";
8+
let twelveHourClockTime = "13.00";
99
let twelthHour = twelveHourClockTime.substring(
1010
0,
1111
twelveHourClockTime.length - 3
@@ -14,10 +14,8 @@ let twelthHour = twelveHourClockTime.substring(
1414

1515
let sufix =".AM"
1616

17-
if (twelthHour === "00") {
18-
twelthHour = "12";
19-
}
20-
if (twelthHour > 12) {
17+
18+
if (twelthHour => 13) {
2119
twelthHour = twelthHour - 12;
2220
sufix =".PM"
2321

0 commit comments

Comments
 (0)