Browse Source

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

* commit '62068ed13c5d6266b440c13689f50214cc9e0763':
  update
master
windy 8 years ago
parent
commit
a1a4307918
  1. 13
      bi/core.js
  2. 13
      docs/core.js
  3. 13
      src/core/proto/date.js

13
bi/core.js

@ -6389,6 +6389,19 @@ Date.prototype.getOffsetMonth = function (n) {
return dt; return dt;
}; };
//获得本周的起始日期
Date.prototype.getWeekStartDate = function () {
var w = this.getDay();
var offset = (w === 0 ? 7 : w);
return this.getOffsetDate(1 - offset);
};
//得到本周的结束日期
Date.prototype.getWeekEndDate = function () {
var w = this.getDay();
var offset = (w === 0 ? 0 : 7 - w);
return this.getOffsetDate(offset);
};
//获得本季度的起始日期 //获得本季度的起始日期
Date.prototype.getQuarterStartDate = function () { Date.prototype.getQuarterStartDate = function () {
return new Date(this.getFullYear(), this.getQuarterStartMonth(), 1); return new Date(this.getFullYear(), this.getQuarterStartMonth(), 1);

13
docs/core.js

@ -23872,6 +23872,19 @@ Date.prototype.getOffsetMonth = function (n) {
return dt; return dt;
}; };
//获得本周的起始日期
Date.prototype.getWeekStartDate = function () {
var w = this.getDay();
var offset = (w === 0 ? 7 : w);
return this.getOffsetDate(1 - offset);
};
//得到本周的结束日期
Date.prototype.getWeekEndDate = function () {
var w = this.getDay();
var offset = (w === 0 ? 0 : 7 - w);
return this.getOffsetDate(offset);
};
//获得本季度的起始日期 //获得本季度的起始日期
Date.prototype.getQuarterStartDate = function () { Date.prototype.getQuarterStartDate = function () {
return new Date(this.getFullYear(), this.getQuarterStartMonth(), 1); return new Date(this.getFullYear(), this.getQuarterStartMonth(), 1);

13
src/core/proto/date.js

@ -196,6 +196,19 @@ Date.prototype.getOffsetMonth = function (n) {
return dt; return dt;
}; };
//获得本周的起始日期
Date.prototype.getWeekStartDate = function () {
var w = this.getDay();
var offset = (w === 0 ? 7 : w);
return this.getOffsetDate(1 - offset);
};
//得到本周的结束日期
Date.prototype.getWeekEndDate = function () {
var w = this.getDay();
var offset = (w === 0 ? 0 : 7 - w);
return this.getOffsetDate(offset);
};
//获得本季度的起始日期 //获得本季度的起始日期
Date.prototype.getQuarterStartDate = function () { Date.prototype.getQuarterStartDate = function () {
return new Date(this.getFullYear(), this.getQuarterStartMonth(), 1); return new Date(this.getFullYear(), this.getQuarterStartMonth(), 1);

Loading…
Cancel
Save