export function onChange({ value, formGroupId }) {
let time = new Date(this.timedat(value));
console.log(this.getWeek(time))
}
export function timedat(res) {
var time = new Date(res);
var y = time.getFullYear();
var m = time.getMonth() + 1;
var d = time.getDate();
return y + '-' + m + '-' + d;
};
export function getWeek(timedat) {
var week;
if (timedat.getDay() == 0) week = "星期日";
if (timedat.getDay() == 1) week = "星期一";
if (timedat.getDay() == 2) week = "星期二";
if (timedat.getDay() == 3) week = "星期三";
if (timedat.getDay() == 4) week = "星期四";
if (timedat.getDay() == 5) week = "星期五";
if (timedat.getDay() == 6) week = "星期六";
return week;
}
|