Created
February 25, 2020 00:14
-
-
Save Seairth/a9ad487b6e4a99131f6dfc4272f965c8 to your computer and use it in GitHub Desktop.
This file contains 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
function tooEarly(announceTime, tooEarlyTime) { | |
let padTime = (v) => v.toString().padStart(2, '0'); | |
let announceHours = padTime(announceTime.getHours()); | |
let announceMinutes = padTime(announceTime.getMinutes()); | |
let tooEarlyHours = padTime(tooEarlyTime.getUTCHours()); | |
let tooEarlyMinutes = padTime(tooEarlyTime.getUTCMinutes()); | |
return `Steve said at ${announceHours}:${announceMinutes} that ${tooEarlyHours}:${tooEarlyMinutes} is too early!`; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment