Author: Tom Sydney Kerckhove <syd@cs-syd.eu>
Committer: Tom Sydney Kerckhove <NorfairKing@users.noreply.github.com>
ical-recurrence: sort the yearly occurrences of one year @ the BYxxx rule parts are applied to the current set of evaluated occurrences in the following order: [...] and BYSETPOS; then COUNT and UNTIL are evaluated. @ COUNT and UNTIL range-bound the occurrences, so they have to arrive in order. The BYWEEKNO branch of yearlyDayCandidate iterates Monday to Sunday whatever the week start is, so with WKST=SU the Sunday of a week came out last even though it is the first day of that week. Sort each year's occurrences, the way monthlyDateTimeRecurrence and weeklyDateTimeRecurrence already sort each month's and each week's. Sorting per year is enough for the whole list to ascend, because the years themselves ascend.