字符串日期转换为周
String.prototype.toWeek=function(){ var date = new Date(this); var week = ""; switch (date.getDay()) { case 0:week = "周日";break; case 1:week = "周一";break; case 2:week = "周二";break; case 3:week = "周三";break; case 4:week = "周四";break; case 5:week = "周五";break; case 6:week = "周六";break; } return week; }
请爱好前端技术的朋友,联系我,有问题大家一起讨论