C# 日期字符串转成javascript日期
1.c# date to js date
var csharpStr='/Date(1479694396330)/';
//替换掉非数字
csharpStr=csharpStr.replace(/[^0-9+]/g, '');
var date = new Date(parseInt(csharpDateStr));
alert(date);
2.js判断日期是否是今天
function isToday(date) {
var todaysDate = new Date();
if (date.setHours(0, 0, 0, 0) == todaysDate.setHours(0, 0, 0, 0)) {
return true;
}
return false;
}