recurring events and occurrence times issues

Hi,sir:

I use “http://docs.dhtmlx.com/scheduler/samples/04_export/04_serialize_recurring.html” to test the recurring events.I create a recurring event about 13th of each month and repeat 5 times.
The ical content:

I have a question could you tell me how to calculate the end_date is “2010-6-13 00:00”,i use the “http://docs.dhtmlx.com/scheduler/ical_export_import.html”, there is a “class.php” to convert ical to xml, but i found the end_date is not the “2010-06-13 00:00”, it’s “9999-02-01 00:00:00”, so the repeat events never stop. But it’s not my expectation.Could you tell me the end_date logic to calculate the correct end_date.

Thank you for your help.