var dq = new Date();//定义当前时间var sDueDate = formatDate(dq);/调用日期转换方法 传入当前时间
//进行日期转换 function formatDate(now) { debugger var year = now.getFullYear(); var month = now.getMonth() + 1; var date = now.getDate()-10; var hour = now.getHours(); var minute = now.getMinutes(); var second = now.getSeconds(); return year + "-" + month + "-" + date; }
原文地址:https://www.cnblogs.com/Ai-Hen-Jiao-zhi/p/10113470.html
时间: 2024-11-05 21:48:24