Commit e2d04d40 authored by lvtz's avatar lvtz

fix

parents 261a294f 415cf504
......@@ -24,11 +24,11 @@ import {
function getTime(n) {
var now = new Date();
var year = now.getFullYear();
var month = now.getMonth() + 1;
var day = now.getDay(); //返回星期几的某一天;
n = day == 0 ? n + 6 : n + (day - 1)
now.setDate(now.getDate() - n);
var year = now.getFullYear();
var month = now.getMonth() + 1;
month = now.getMonth() + 1;
var date = now.getDate();
var s = year + "-" + (month < 10 ? ('0' + month) : month) + "-" + (date < 10 ? ('0' + date) : date);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment