1var dateWithouthSecond = new Date();
2dateWithouthSecond.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});
3
1var dateWithoutSecond = new Date();
2dateWithoutSecond.toLocaleTimeString([], {year: 'numeric', month: 'numeric', day: 'numeric', hour: '2-digit', minute: '2-digit'});
3