Skip to content

Commit

Permalink
Merge pull request jkbrzt#125 from polo2ro/master
Browse files Browse the repository at this point in the history
Prevent unexpected results with dates lower than 1970
  • Loading branch information
arolson101 authored Feb 14, 2018
2 parents ca76679 + 90116dc commit 9bf0143
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/rrule.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,34 @@ describe('RRule', function () {
]
)

testRecurring('testYearlyBetweenInc',
{
rrule: new RRule({
freq: RRule.YEARLY,
dtstart: parse('20150101T000000')
}),
method: 'between',
args: [parse('20160101T000000'), parse('20160101T000000'), true]
},
[
datetime(2016, 1, 1)
]
)

testRecurring.skip('testYearlyBetweenIncLargeSpan',
{
rrule: new RRule({
freq: RRule.YEARLY,
dtstart: parse('19200101T000000') // Error because date lower than dateutil.ORDINAL_BASE
}),
method: 'between',
args: [parse('20160101T000000'), parse('20160101T000000'), true]
},
[
datetime(2016, 1, 1)
]
)

testRecurring('testMonthly',
new RRule({freq: RRule.MONTHLY,
count: 3,
Expand Down

0 comments on commit 9bf0143

Please sign in to comment.