Skip to content

Commit d06ca43

Browse files
fix: correct minutes extraction in formatAs12HourClock function
1 parent a732e8d commit d06ca43

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Sprint-3/5-stretch-extend/format-time.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
function formatAs12HourClock(time) {
66
// Extract hours as a Number and minutes as a String
77
const hours = Number(time.slice(0, 2));
8-
const minutes = time.slice(3, 5);
8+
const minutes = time.slice(-2);
99

1010
let formattedHours;
1111
let period;

0 commit comments

Comments
 (0)