DataStandardizer.File.iCal
Reading and writing of iCalendar data, in the .ics format and in its JSON (jCal) and XML (xCal) forms, with recurrence expansion and time-zone resolution.
dotnet add package DataStandardizer.File.iCal
Standards
| Standard | What it provides |
|---|---|
| RFC 5545 | Internet Calendaring and Scheduling Core Object Specification (iCalendar): the .ics content-line syntax, the VCALENDAR, VEVENT, VTODO, VJOURNAL, VFREEBUSY, VTIMEZONE and VALARM components, value types and recurrence rules. |
| RFC 6868 | Parameter Value Encoding in iCalendar and vCard: caret encoding of double quotes and line breaks in parameter values. |
| RFC 7986 | New Properties for iCalendar: NAME, DESCRIPTION, COLOR, IMAGE, REFRESH-INTERVAL, SOURCE and others. |
| RFC 7265 | jCal: The JSON Format for iCalendar. |
| RFC 6321 | xCal: The XML Format for iCalendar. |
The readers and writers follow the RFCs by default. A reader rejects input that breaks a MUST or MUST NOT rule, and a writer refuses to write a model that does. Each accommodation for common non-compliant input is a separate option that you turn on by name. See Standards compliance by default.
The package doesn’t support vCalendar 1.0 (VERSION:1.0), iTIP (RFC 5546) or RSCALE (RFC 7529). A vCalendar 1.0 file is rejected with an error.
Platform support
Targets .NET Standard 1.1, 2.0 and 2.1, and .NET 10.
Applies to: the async API, the file-path constructors and the
Systemtime-zone resolver need .NET Standard 2.0 or later. jCal (JcalReaderandJcalWriter) needs .NET Standard 2.0 or later too. On .NET Standard 1.1, read and write synchronously, from aStream,TextReaderorTextWriter.IcalOptionsis arecordonnet10.0, sowithexpressions work there, and a plainclasson the .NET Standard targets.
The package depends on DataStandardizer.Communication for media types and base64, which brings in DataStandardizer.LanguageTag, DataStandardizer.Geography and DataStandardizer.Language.
See Platform support for the full matrix.
How-to guides
- Read and write .ics files
- Read asynchronously
- Read with zero copies
- Expand recurrences
- Convert between .ics, jCal and xCal
- Read non-compliant feeds
- Read and write xCal
- Read and write jCal
Concepts
Reference
Table of contents
- Read and write .ics files
- Read asynchronously
- Read with zero copies
- Expand recurrences
- Convert between .ics, jCal and xCal
- Read non-compliant feeds
- xCal (XML)
- jCal (JSON)
- The layered model
- Standards compliance by default
- Time-zone resolution
- DST gaps and overlaps
- API reference
- IIcalTimeZoneResolver Interface
- IcalAlarm Class
- IcalCalendar Class
- IcalComponent Class
- IcalComponentNames Class
- IcalContentLine Class
- IcalContentLineParameter Class
- IcalContentLineReader Class
- IcalContentLineView Struct
- IcalContentLineWriter Class
- IcalDate Struct
- IcalDateOrDateTime Struct
- IcalDateTime Struct
- IcalDateTimeKind Enum
- IcalDiagnostic Class
- IcalDiagnosticKind Enum
- IcalDuration Struct
- IcalEvent Class
- IcalFileException Class
- IcalFreeBusy Class
- IcalJournal Class
- IcalOccurrence Class
- IcalOptions Class
- IcalParameterNames Class
- IcalPeriod Struct
- IcalPropertyNames Class
- IcalReader Class
- IcalRecurrenceDay Struct
- IcalRecurrenceFrequency Enum
- IcalRecurrenceRule Struct
- IcalTextListEnumerator Struct
- IcalTime Struct
- IcalTimeZone Class
- IcalTimeZoneObservance Class
- IcalTimeZoneObservanceKind Enum
- IcalTimeZoneResolver Class
- IcalTimeZoneRules Class
- IcalTimeZoneTransition Struct
- IcalTodo Class
- IcalUtcOffset Struct
- IcalValue Class
- IcalValueFormat Enum
- IcalValueType Enum
- IcalValueTypeRegistry Class
- IcalWriteProgress Struct
- IcalWriter Class
- JcalReader Class
- JcalWriter Class
- XcalReader Class
- XcalWriter Class