|
|
@ -23875,13 +23875,12 @@ Date.prototype.getOffsetMonth = function (n) { |
|
|
|
//获得本周的起始日期
|
|
|
|
//获得本周的起始日期
|
|
|
|
Date.prototype.getWeekStartDate = function () { |
|
|
|
Date.prototype.getWeekStartDate = function () { |
|
|
|
var w = this.getDay(); |
|
|
|
var w = this.getDay(); |
|
|
|
var offset = (w === 0 ? 7 : w); |
|
|
|
return this.getOffsetDate(-w); |
|
|
|
return this.getOffsetDate(1 - offset); |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
//得到本周的结束日期
|
|
|
|
//得到本周的结束日期
|
|
|
|
Date.prototype.getWeekEndDate = function () { |
|
|
|
Date.prototype.getWeekEndDate = function () { |
|
|
|
var w = this.getDay(); |
|
|
|
var w = this.getDay(); |
|
|
|
var offset = (w === 0 ? 0 : 7 - w); |
|
|
|
var offset = (w === 0 ? 6 : 6 - w); |
|
|
|
return this.getOffsetDate(offset); |
|
|
|
return this.getOffsetDate(offset); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|