var weekday = getWeekday('2013-9-26'); function getWeekday(sDate){ var dt = new Date(sDate.replace(/-/g, '/')); var a = ['星期日', '星期一','星期二','星期三','星期四','星期五','星期六']; return a[dt.getDay()]; }