JavaScript (Chrome / Edge / Node), 50 bytes
Very hackish. Assumes no DST.
s=>(new Date(+new Date([1,s])+6e4)+s).slice(16,21)
How?Commented
[1,s] is implicitly coerced to a string, leading to "1,HH:MM" which is interpreted as Mon Jan 01 2001 HH:MM:00. We force a conversion to an integer, add 60000 milliseconds (1 minute), convert the result back to a date and finally to a string from which the updated time is extracted.
s => // s = "HH:MM"
( new Date( // generate a date:
+new Date( // generate a timestamp corresponding to:
[1, s] // "1,HH:MM" which is interpreted as
// Mon Jan 01 2001 HH:MM:00
) // end of Date()
+ 6e4 // add 60000 milliseconds (1 minute)
) // end of Date()
+ s // coerce to a string
).slice(16, 21) // extract the updated "HH:MM"
JavaScript (Chrome / Edge / Node), 50 bytes
Very hackish. Assumes no DST.
s=>(new Date(+new Date([1,s])+6e4)+s).slice(16,21)
How?
[1,s] is implicitly coerced to a string, leading to "1,HH:MM" which is interpreted as Mon Jan 01 2001 HH:MM:00. We force a conversion to an integer, add 60000 milliseconds (1 minute), convert the result back to a date and finally to a string from which the updated time is extracted.
JavaScript (Chrome / Edge / Node), 50 bytes
Very hackish.
s=>(new Date(+new Date([1,s])+6e4)+s).slice(16,21)
Commented
s => // s = "HH:MM"
( new Date( // generate a date:
+new Date( // generate a timestamp corresponding to:
[1, s] // "1,HH:MM" which is interpreted as
// Mon Jan 01 2001 HH:MM:00
) // end of Date()
+ 6e4 // add 60000 milliseconds (1 minute)
) // end of Date()
+ s // coerce to a string
).slice(16, 21) // extract the updated "HH:MM"
JavaScript (ES6Chrome / Edge / Node), 50 bytes
Very hackish. Assumes no DST.
s=>(new Date(+new Date([1,s])+6e4)+s).slice(16,21)
How?
[1,s] is implicitly coerced to a string, leading to "1,HH:MM" which is interpreted as Mon Jan 01 2001 HH:MM:00. We force a conversion to an integer, add 60000 milliseconds (1 minute), convert the result back to a date and finally to a string from which the updated time is extracted.
JavaScript (ES6), 50 bytes
Very hackish. Assumes no DST.
s=>(new Date(+new Date([1,s])+6e4)+s).slice(16,21)
How?
[1,s] is implicitly coerced to a string, leading to "1,HH:MM" which is interpreted as Mon Jan 01 2001 HH:MM:00. We force a conversion to an integer, add 60000 milliseconds (1 minute), convert the result to a date and finally to a string from which the updated time is extracted.
JavaScript (Chrome / Edge / Node), 50 bytes
Very hackish. Assumes no DST.
s=>(new Date(+new Date([1,s])+6e4)+s).slice(16,21)
How?
[1,s] is implicitly coerced to a string, leading to "1,HH:MM" which is interpreted as Mon Jan 01 2001 HH:MM:00. We force a conversion to an integer, add 60000 milliseconds (1 minute), convert the result back to a date and finally to a string from which the updated time is extracted.
JavaScript (ES6), 50 bytes
Very hackish. Assumes no DST.
s=>(new Date(+new Date([1,s])+6e4)+s).slice(16,21)
How?
[1,s] is implicitly coerced to a string, leading to "1,HH:MM" which is interpreted as Mon Jan 01 2001 HH:MM:00. We force a conversion to an integer, add 60000 milliseconds (1 minute), convert the result to a date and finally to a string from which the updated time is extracted.