getminutes js converting 0 to 8 code example Example: javascript date get minutes with leading zero mins = ('0'+current_date.getMinutes()).slice(-2);