var weekday = getWeekday('2013-9-26'); function getWeekday(sDate){ var dt = new Date(sDate.replace(/-/g, '/')); var a = ['星期日', '星期一','星期二','星期三','星期四','星期五','星期六']; return a[dt.getDay()]; }…
--根据日期查询星期SELECT SYSDATETIME();select datepart(weekday,getdate()); SET DATEFIRST 1select '星期'+case when cast(datepart(dw,getdate()) as char(1))= 7 then '天' else cast(datepart(dw,getdate()) as char(1)) end select @@datefirst; datefirst 一般美国采用星期天作为一周的第…
//这些天常接触到有关于js操作日期事 就小结了一下,希望对你有帮助 function conversionDate(a,b){ var start =a.split('-'); var end = b.split('-'); //转换为date对象 var strDateS = new Date(start[0], start[1], start[2]); var strDateE = new Date(end[0], end[1], end[2]); var differ=parseInt(…
//设置节假日的数组 var holiday = Array('2016-04-30','2016-05-01','2016-05-02','2016-06-09','2016-06-10','2016-06-11','2016-09-15','2016-09-16','2016-09-17','2016-10-1','2016-10-01','2016-10-02','2016-10-03','2016-10-04','2016-10-05','2016-10-06','201…