PHP
·
发表于 5年以前
·
阅读量:8391
function doHandleDate() {
var myDate = new Date();
var tYear = myDate.getFullYear();
var tMonth = myDate.getMonth();
var m = tMonth + 1;
if (m.toString().length == 1) {
m = "0" + m;
}
return tYear +'-'+ m;
}
function doHandleYear(tYear) {
var myDate = new Date();
var tYear = myDate.getFullYear();
return tYear;
}
function doHandleMonth() {
var myDate = new Date();
var tMonth = myDate.getMonth();
var m = tMonth + 1;
if (m.toString().length == 1) {
m = "0" + m;
}
return m;
}