Browse Source

Merge pull request #45 in ~GUY/fineui from ~WINDY/fineui:master to master

* commit '783906fa1030d1c8881d48d8c0d7f01355c6d3fe':
  以周日为一周第一天
master
windy 8 years ago
parent
commit
9c99f469dd
  1. 5
      bi/core.js
  2. 5
      docs/core.js
  3. 5
      src/core/proto/date.js

5
bi/core.js

@ -6392,13 +6392,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);
}; };

5
docs/core.js

@ -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);
}; };

5
src/core/proto/date.js

@ -199,13 +199,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);
}; };

Loading…
Cancel
Save