Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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;
 
PREVIOUS NEXT
Tagged: #minutes #javascript
ADD COMMENT
Topic
Name
8+2 =