Add monthly repeat test

pull/1360/head
Alex Baker 5 years ago
parent c2b54e8bf5
commit 88950fd3f9

@ -55,4 +55,23 @@ class RepeatMonthlyTests : RepeatTests() {
assertEquals(newDayTime(2017, 2, 28, 13, 30), next) assertEquals(newDayTime(2017, 2, 28, 13, 30), next)
} }
/* https://tools.ietf.org/html/rfc5545#section-3.3.10
* Recurrence rules may generate recurrence instances with an invalid
* date (e.g., February 30) or nonexistent local time (e.g., 1:30 AM
* on a day where the local time is moved forward by an hour at 1:00
* AM). Such recurrence instances MUST be ignored and MUST NOT be
* counted as part of the recurrence set.
*/
@Test
fun repeatJanuary30th() {
val task = newFromDue(
"FREQ=MONTHLY;INTERVAL=1",
newDayTime(2017, 1, 30, 13, 30)
)
val next = calculateNextDueDate(task)
assertEquals(newDayTime(2017, 3, 30, 13, 30), next)
}
} }
Loading…
Cancel
Save