13 lines
307 B
JavaScript
13 lines
307 B
JavaScript
|
|
// 返回时间对象
|
||
|
|
module.exports = () => {
|
||
|
|
let now = new Date(),
|
||
|
|
times = {
|
||
|
|
year: now.getFullYear(),
|
||
|
|
month: now.getMonth() + 1,
|
||
|
|
day: now.getDate(),
|
||
|
|
hour: now.getHours(),
|
||
|
|
minute: now.getMinutes(),
|
||
|
|
second: now.getSeconds()
|
||
|
|
};
|
||
|
|
return times;
|
||
|
|
};
|