标签:fun function func 转换 星期六 break switch 时间戳 angular
.filter(‘getWeek‘, function() {
return function(input) {
var date = new Date(input * 1000);
var week = date.getDay();
switch (week) {
case 0:
return "星期天";
break;
case 1:
return "星期一";
break;
case 2:
return "星期二";
break;
case 3:
return "星期三";
break;
case 4:
return "星期四";
break;
case 5:
return "星期五";
break;
case 6:
return "星期六";
break;
}
}
})
标签:fun function func 转换 星期六 break switch 时间戳 angular
原文地址:http://www.cnblogs.com/Byme/p/7554040.html