Files
chocomae/src/game/lib/date_util.js
T
2018-05-30 09:13:45 +09:00

14 lines
405 B
JavaScript

class DateUtil {
static getYYYYMMDD(date) {
// return date.toISOString().slice(0,10);
return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
}
static getHHMMSS(date) {
return StringUtil.getNumberStartWithZero(date.getHours(), 2) + ":"
+ StringUtil.getNumberStartWithZero(date.getMinutes(), 2) + ":"
+ StringUtil.getNumberStartWithZero(date.getSeconds(), 2);
}
}