Skip to content

Commit 7cad0b1

Browse files
committed
revise
1 parent e6437a8 commit 7cad0b1

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

test/jasmine/tests/lib_date_test.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ describe('dates', function() {
387387

388388
var dates = [];
389389

390-
for(var y = 1000; y < 1525; y++) {
390+
for(var y = 475; y < 1525; y++) {
391391
if(y === 0) continue;
392392
for(var m = 1; m <= 12; m++) {
393393
for(var d = 1; d <= (m < 7 ? 31 : 30); d++) {
@@ -408,9 +408,21 @@ describe('dates', function() {
408408

409409
var tests = [];
410410
for(var i = 0; i < dates.length; i++) {
411-
var date = tests[i];
412-
var time = (i - unixIndex) * 86400000;
413-
tests.push([date, time]);
411+
var y = tests[i][0];
412+
var m = tests[i][1];
413+
var d = tests[i][2];
414+
415+
// only test days at the start/end of months
416+
if(d < 3 || d > 28) {
417+
var ms = (i - unixIndex) * 86400000;
418+
var dateStr = [
419+
y,
420+
(m < 10 ? '0' : '') + m,
421+
(d < 10 ? '0' : '') + d
422+
].join('-');
423+
424+
tests.push([dateStr, ms]);
425+
}
414426
}
415427

416428
tests.forEach(function(v) {

0 commit comments

Comments
 (0)