I need to know how do i avoid UNTIL or end date getting excluded in the date range being created in this - https://stackoverflow.com/a/27628608/5311573
Please help.
I'm trying to get the date range using the answer given in above link but it excludes the end date every time.
StartDate = 2020-04-21T00:00:00.000+05:30;
RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20200428
it will return me below result:
2020-04-20T18:30:00.000Z
2020-04-21T18:30:00.000Z
2020-04-22T18:30:00.000Z
2020-04-23T18:30:00.000Z
2020-04-24T18:30:00.000Z
2020-04-25T18:30:00.000Z
2020-04-26T18:30:00.000Z
2020-04-27T18:30:00.000Z
Your start date and time appears to be 2020-04-20T18:30:00.000Z despite your pseudo code above. Because that is what you have listed as your results: recurrences at 18.30.
With a daily recurrence at those times, 2020-04-28T18:30:00.000Z would be AFTER 2020-04-20T00:00:000Z.
So make the start date or datetime and end date or datetime consistent. From https://icalendar.org/iCalendar-RFC-5545/3-3-10-recurrence-rule.html, it says:
change UNTIL to 2020-04-28T18:30:00.000Z if UTC time intended or 2020-04-28T18:30:00.000 if floating time intended.
Basically DTSTART And UNTIL must match.