You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
413 B
15 lines
413 B
5 years ago
|
export function getNowFormatDate() {
|
||
|
var date = new Date();
|
||
|
var seperator1 = "-";
|
||
|
var year = date.getFullYear();
|
||
|
var month = date.getMonth() + 1;
|
||
|
var strDate = date.getDate();
|
||
|
if (month >= 1 && month <= 9) {
|
||
|
month = "0" + month;
|
||
|
}
|
||
|
if (strDate >= 0 && strDate <= 9) {
|
||
|
strDate = "0" + strDate;
|
||
|
}
|
||
|
var currentdate = year + seperator1 + month + seperator1 + strDate;
|
||
|
return currentdate;
|
||
|
}
|