Answers for "make minutes have 0 in javascript"

3

make minutes have 0 in javascript

String(date.getMinutes()).padStart(2, "0");

sets expected result as having two digits, if one is missing replace it with 0;
Posted by: Guest on January-08-2021
-1

javascript date get minutes with leading zero

mins = ('0'+current_date.getMinutes()).slice(-2);
Posted by: Guest on September-08-2020

Code answers related to "make minutes have 0 in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language