+
+ // TODO: what is this good for?
+ /*
+ Here we need to correct the date. Remember that the startdate given in
+ the event is not necessarily a date of the sequence!
+
+ The 'numDaysInMonth' localvar contains the number of days in the
+ current month (eg 31 for Januar, 28 for most February's, etc)
+
+ Eg: MONTHLY;BYDAY=-1WE (last wednesday, every month)
+
+ cursor: 2007-01-30 (eventDayOfMonth = 30)
+ =>start: 2007-01-31 (dom = 31)
+ cursor: 2007-02-28 (eventDayOfMonth = 30)
+ =>start: 2007-02-28 (dom = 28)
+
+ Note: in case the cursor already had an event-day overflow, that is the
+ 'eventDayOfMonth' is bigger than the 'numDaysInMonth', the cursor
+ will already be corrected!
+ Eg:
+ start was: 2007-01-30
+ cursor will be: 2007-02-28
+ */
+ if (eventDayOfMonth == dom) {