Browse Source

Merge pull request #251 in ~GUY/fineui from ~WINDY/fineui:BI4.1 to BI4.1

* commit '86dc183930e116a931882f3d63e2d1c93f2b3ae9':
  周数的先改回去
master
windy 7 years ago
parent
commit
1f07bc7e0e
  1. 4
      bi/core.js
  2. 4
      dist/bundle.js
  3. 68
      dist/bundle.min.js
  4. 4
      dist/core.js
  5. 4
      src/core/proto/date.js

4
bi/core.js

@ -20861,7 +20861,7 @@ Date.prototype.getDayOfYear = function () {
Date.prototype.getWeekNumber = function () { Date.prototype.getWeekNumber = function () {
var d = Date.getDate(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); var d = Date.getDate(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
//周一是一周第一天 //周一是一周第一天
var week = d.getDay() === 0 ? 6 : d.getDay(); var week = d.getDay();
if (this.getMonth() === 0 && this.getDate() <= week) { if (this.getMonth() === 0 && this.getDate() <= week) {
return 1; return 1;
} }
@ -20870,7 +20870,7 @@ Date.prototype.getWeekNumber = function () {
d.setMonth(0); d.setMonth(0);
d.setDate(1); d.setDate(1);
var offset = Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1; var offset = Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1;
if (d.getDay() !== 1) { if (d.getDay() > 0) {
offset++; offset++;
} }
return offset; return offset;

4
dist/bundle.js vendored

@ -20861,7 +20861,7 @@ Date.prototype.getDayOfYear = function () {
Date.prototype.getWeekNumber = function () { Date.prototype.getWeekNumber = function () {
var d = Date.getDate(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); var d = Date.getDate(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
//周一是一周第一天 //周一是一周第一天
var week = d.getDay() === 0 ? 6 : d.getDay(); var week = d.getDay();
if (this.getMonth() === 0 && this.getDate() <= week) { if (this.getMonth() === 0 && this.getDate() <= week) {
return 1; return 1;
} }
@ -20870,7 +20870,7 @@ Date.prototype.getWeekNumber = function () {
d.setMonth(0); d.setMonth(0);
d.setDate(1); d.setDate(1);
var offset = Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1; var offset = Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1;
if (d.getDay() !== 1) { if (d.getDay() > 0) {
offset++; offset++;
} }
return offset; return offset;

68
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

4
dist/core.js vendored

@ -20861,7 +20861,7 @@ Date.prototype.getDayOfYear = function () {
Date.prototype.getWeekNumber = function () { Date.prototype.getWeekNumber = function () {
var d = Date.getDate(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); var d = Date.getDate(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
//周一是一周第一天 //周一是一周第一天
var week = d.getDay() === 0 ? 6 : d.getDay(); var week = d.getDay();
if (this.getMonth() === 0 && this.getDate() <= week) { if (this.getMonth() === 0 && this.getDate() <= week) {
return 1; return 1;
} }
@ -20870,7 +20870,7 @@ Date.prototype.getWeekNumber = function () {
d.setMonth(0); d.setMonth(0);
d.setDate(1); d.setDate(1);
var offset = Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1; var offset = Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1;
if (d.getDay() !== 1) { if (d.getDay() > 0) {
offset++; offset++;
} }
return offset; return offset;

4
src/core/proto/date.js

@ -109,7 +109,7 @@ Date.prototype.getDayOfYear = function () {
Date.prototype.getWeekNumber = function () { Date.prototype.getWeekNumber = function () {
var d = Date.getDate(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); var d = Date.getDate(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
//周一是一周第一天 //周一是一周第一天
var week = d.getDay() === 0 ? 6 : d.getDay(); var week = d.getDay();
if (this.getMonth() === 0 && this.getDate() <= week) { if (this.getMonth() === 0 && this.getDate() <= week) {
return 1; return 1;
} }
@ -118,7 +118,7 @@ Date.prototype.getWeekNumber = function () {
d.setMonth(0); d.setMonth(0);
d.setDate(1); d.setDate(1);
var offset = Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1; var offset = Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1;
if (d.getDay() !== 1) { if (d.getDay() > 0) {
offset++; offset++;
} }
return offset; return offset;

Loading…
Cancel
Save