I need this translated from iCAL format into “friendly” name.

EXAMPLE:

String = DTSTART:20080101T000000 RRULE:FREQ=MONTHLY;BYDAY=SU,MO,TU,WE,TH,FR,SA;BYSETPOS=-1  

Result should be = Monthly on 1st day of month

Sample strings:

DTSTART:20080322T000000  RRULE:FREQ=WEEKLY;BYDAY=SA
DTSTART:19800101T000000  RRULE:FREQ=MONTHLY;BYMONTHDAY=-1,15;INTERVAL=1
DTSTART:20100101T000000  RRULE:FREQ=MONTHLY;BYMONTH=10;BYDAY=SU,MO,TU,WE,TH,FR,SA;BYSETPOS=1
DTSTART:20160630T000000  RRULE:FREQ=MONTHLY;INTERVAL=6;BYDAY=SU,MO,TU,WE,TH,FR,SA;BYSETPOS=-1
DTSTART:20230528T000000  RRULE:FREQ=WEEKLY;BYDAY=SA;INTERVAL=2

Thank you.

New contributor

Muneeb Hassan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.