Commit 883bf2c7 authored by 黄媛媛's avatar 黄媛媛

1

parent 695298c7
......@@ -99,6 +99,15 @@ Date.prototype.Format = function (fmt) {
}
return fmt;
};
Vue.prototype.DateDiff = function (sDate1, sDate2) {
var aDate, oDate1, oDate2, iDays
aDate = sDate1.split("-")
oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])
aDate = sDate2.split("-")
oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])
iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 /24) //把相差的毫秒数转换为天数
return iDays
}
// 数组对比
Array.prototype.equals = function (array) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment