Differential D16614 Diff 40004 src/parser/calendar/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/parser/calendar/data/__tests__/PhutilCalendarRecurrenceRuleTestCase.php
Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | public function testYearlyRecurrenceRules() { | ||||
); | ); | ||||
$expect[] = array( | $expect[] = array( | ||||
'19980101', | '19980101', | ||||
'19980303', | '19980303', | ||||
'20010301', | '20010301', | ||||
); | ); | ||||
$tests[] = array( | $tests[] = array( | ||||
'BYDAY' => array('1TU', '-1TH'), | |||||
); | |||||
$expect[] = array( | |||||
'19971225', | |||||
'19980106', | |||||
'19981231', | |||||
); | |||||
// Same test as above, just making sure the optional "+" syntax works. | |||||
$tests[] = array( | |||||
'BYDAY' => array('+1TU', '-1TH'), | |||||
); | |||||
$expect[] = array( | |||||
'19971225', | |||||
'19980106', | |||||
'19981231', | |||||
); | |||||
$tests[] = array( | |||||
'BYDAY' => array('3TU', '-3TH'), | |||||
); | |||||
$expect[] = array( | |||||
'19971211', | |||||
'19980120', | |||||
'19981217', | |||||
); | |||||
$tests[] = array( | |||||
'BYMONTH' => array(1, 3), | |||||
'BYDAY' => array('1TU', '-1TH'), | |||||
); | |||||
$expect[] = array( | |||||
'19980106', | |||||
'19980129', | |||||
'19980303', | |||||
); | |||||
$tests[] = array( | |||||
'BYMONTH' => array(1, 3), | |||||
'BYDAY' => array('3TU', '-3TH'), | |||||
); | |||||
$expect[] = array( | |||||
'19980115', | |||||
'19980120', | |||||
'19980312', | |||||
); | |||||
$tests[] = array( | |||||
'BYYEARDAY' => array(1, 100, 200, 365), | 'BYYEARDAY' => array(1, 100, 200, 365), | ||||
'COUNT' => 4, | 'COUNT' => 4, | ||||
); | ); | ||||
$expect[] = array( | $expect[] = array( | ||||
'19971231', | '19971231', | ||||
'19980101', | '19980101', | ||||
'19980410', | '19980410', | ||||
'19980719', | '19980719', | ||||
▲ Show 20 Lines • Show All 233 Lines • Show Last 20 Lines |