13 lines
426 B
JavaScript
13 lines
426 B
JavaScript
function DateUtil() {
|
|
}
|
|
|
|
DateUtil.getYYYYMMDD = function(date) {
|
|
// return date.toISOString().slice(0,10);
|
|
return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
|
|
}
|
|
|
|
DateUtil.getHHMMSS = function(date) {
|
|
return StringUtil.getNumberStartWithZero(date.getHours(), 2) + ":"
|
|
+ StringUtil.getNumberStartWithZero(date.getMinutes(), 2) + ":"
|
|
+ StringUtil.getNumberStartWithZero(date.getSeconds(), 2);
|
|
} |