Fix: dateutil getYYYYMMDD

This commit is contained in:
jisangs committed 2019-06-04 22:49:21 +09:00
1 parent c542976cf3
commit 26fb8bbf57
1 file changed
+4 -1
+4 -1
View File
@@ -3,7 +3,10 @@ function DateUtil() {
DateUtil.getYYYYMMDD = function(date) {
// return date.toISOString().slice(0,10);
return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
var yymmdd = date.getFullYear() + "-"
+ ("0" + (date.getMonth() + 1)).slice(-2) + "-"
+ ("0" + date.getDate()).slice(-2);
return yymmdd;
}
DateUtil.getHHMMSS = function(date) {