ics文件解析

本文,翻译并节选至 rfc2445 规范文档

首先一下是一个ICS文件的内容

BEGIN:VCALENDAR
    PRODID:-//Chen Wei//2016 China Public Holiday Calendar//EN
    VERSION:2.0
    CALSCALE:GREGORIAN
    METHOD:PUBLISH
    X-WR-CALNAME:2016 China Public Holiday
    X-WR-TIMEZONE:Asia/Shanghai
    X-WR-CALDESC:上证公告[2015]36号
    BEGIN:VEVENT
        DTSTAMP:20160101T043225Z
        UID:20161007-holiday@infinet.github.io
        DTSTART;VALUE=DATE:20161007
        DTEND;VALUE=DATE:20161008
        STATUS:CONFIRMED
        SUMMARY:国庆节
    END:VEVENT
END:VCALENDAR