ical

package
v0.27.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ical writes iCalendar (RFC 5545) feeds, which calendar apps such as Google Calendar subscribe to by address.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(c Calendar, now time.Time) []byte

Encode writes c as an iCalendar document, stamped now.

Types

type Calendar

type Calendar struct {
	Name        string
	Description string
	// Refresh is how often a subscriber should fetch the feed again; apps
	// treat it as a hint.
	Refresh time.Duration
	Events  []Event
}

Calendar is a feed's name and events.

type Event

type Event struct {
	UID         string
	Summary     string
	Description string
	Start       time.Time
	End         time.Time
	Timed       bool
}

Event is an all-day event on the days Start..End, both inclusive, as dates with no time zone; or, when Timed, the instants Start to End.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL