Documentation
¶
Overview ¶
Package ics reads iCalendar (RFC 5545) data into busy time. It is a deliberately small reader, not a full implementation: it understands VEVENT with DTSTART/DTEND/DURATION, IANA TZIDs (resolved via the Go time zone database), all-day events, EXDATE, and DAILY/WEEKLY recurrence with INTERVAL, COUNT, UNTIL, and BYDAY. Unsupported recurrence frequencies fall back to the first occurrence only. That covers the overwhelming share of real calendar feeds — every major provider exports a secret iCal URL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Calendar ¶
Calendar is a parsed feed.
func Parse ¶
Parse reads an iCalendar stream. Floating (zone-less) times are interpreted in UTC; pass a calendar default via ParseIn if you need otherwise.
func (*Calendar) Busy ¶
Busy expands every opaque, non-cancelled event within the window into a normalized busy set.
func (*Calendar) OccurrencesIn ¶ added in v0.2.0
func (c *Calendar) OccurrencesIn(window interval.Span) []Occurrence
OccurrencesIn expands every non-cancelled event (including transparent ones — an agenda still shows them) into concrete instances overlapping the window, sorted by start time.
type Event ¶
type Event struct {
UID string
Summary string
Location string
Description string
URL string
Start time.Time
End time.Time
Stamp time.Time // DTSTAMP; used when encoding
AllDay bool
Transparent bool // TRANSP:TRANSPARENT — shows as free
Cancelled bool
Organizer Attendee
Attendees []Attendee
Recur *Recurrence
ExDates []time.Time
}
Event is one VEVENT, recurrence not yet expanded.
type Occurrence ¶ added in v0.2.0
Occurrence is one concrete instance of an event.