ICS files can have a lot of different elements and parameters. What is the minimum information needed for an ICS file?
ICS files can have a lot of different elements and parameters. What is the minimum information needed for an ICS file?
According to the RFC5545 icalendar specification:
The icalendar object must have a start and end https://datatracker.ietf.org/doc/html/rfc5545#section-3.4
For the calendar properties at the start of the file, see what 'must' and what 'can' be specified: https://datatracker.ietf.org/doc/html/rfc5545#section-3.7 EG PRODID & VERSION are must be there. So this may be the absolute minimum:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
END:VCALENDAR
I thought that recently a VTIMEZONE component was made required, howrever I'm not finding where it says that: https://datatracker.ietf.org/doc/html/rfc5545#section-3.6.5
Then one could have an ics file empty of components, but lets assume you at least want one component present and lets assume you want a VEVENT:
For VEVENTS, see all that say "The following are REQUIRED," : https://datatracker.ietf.org/doc/html/rfc5545#section-3.6.1 sometimes what is required depends on other circumstances. According to this spec version one can get away without a DTEND and DURATION. dtstamp & uid are required. DTSTART is REQUIRED if the component appears in an iCalendar object that doesn't specify the "METHOD" property. The SUMMARY appears to be optional!
Of course receiving applications may have their own idea about what to do with an Event that doesn't at least have a 'SUMMARY'.
So in summary the simplest may be:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID:19970610T172345Z-AF23B2@example.com
DTSTAMP:19970610T172345Z
DTSTART:19970714T170000Z
END:VEVENT
END:VCALENDAR