{"id":51043741,"url":"https://github.com/floatpane/go-icalendar","last_synced_at":"2026-06-22T12:02:24.690Z","repository":{"id":361842403,"uuid":"1256071775","full_name":"floatpane/go-icalendar","owner":"floatpane","description":"Go library to handle iCal invites","archived":false,"fork":false,"pushed_at":"2026-06-09T21:51:55.000Z","size":112,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-09T23:19:14.164Z","etag":null,"topics":["builder","calendar","data-serialization","events","freebusy","generator","go","golang","golang-li","ical","icalendar","ics","ics-parser","parser","recurrence","rfc-5545","rfc5545","rrule","rsvp","scheduling"],"latest_commit_sha":null,"homepage":"https://icalendar.floatpane.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/floatpane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"floatpane"}},"created_at":"2026-06-01T12:40:54.000Z","updated_at":"2026-06-01T17:52:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/floatpane/go-icalendar","commit_stats":null,"previous_names":["floatpane/go-icalendar"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/floatpane/go-icalendar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatpane%2Fgo-icalendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatpane%2Fgo-icalendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatpane%2Fgo-icalendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatpane%2Fgo-icalendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floatpane","download_url":"https://codeload.github.com/floatpane/go-icalendar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatpane%2Fgo-icalendar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34647750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["builder","calendar","data-serialization","events","freebusy","generator","go","golang","golang-li","ical","icalendar","ics","ics-parser","parser","recurrence","rfc-5545","rfc5545","rrule","rsvp","scheduling"],"created_at":"2026-06-22T12:02:23.721Z","updated_at":"2026-06-22T12:02:24.671Z","avatar_url":"https://github.com/floatpane.png","language":"Go","funding_links":["https://github.com/sponsors/floatpane"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# go-icalendar\n\n**Ergonomic iCalendar (RFC 5545) and iMIP (RFC 6047) for Go. Parse invites, build REQUEST/REPLY/CANCEL, expand RRULE recurrences, compute free/busy.**\n\n[![Go Version](https://img.shields.io/github/go-mod/go-version/floatpane/go-icalendar)](https://golang.org)\n[![Go Reference](https://pkg.go.dev/badge/github.com/floatpane/go-icalendar.svg)](https://pkg.go.dev/github.com/floatpane/go-icalendar)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/floatpane/go-icalendar)](https://github.com/floatpane/go-icalendar/releases)\n[![CI](https://github.com/floatpane/go-icalendar/actions/workflows/ci.yml/badge.svg)](https://github.com/floatpane/go-icalendar/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\n\u003c/div\u003e\n\n`go-icalendar` turns the low-level property bag of an `.ics` file into a flat,\nrender-ready `Event` struct, and provides the scheduling glue an email client\notherwise writes by hand: parsing invites, building outgoing REQUEST/CANCEL\nmessages, generating the fiddly iMIP replies Google Calendar and Outlook\nrequire, expanding recurrence rules, and computing availability.\n\nIt was extracted from [matcha](https://github.com/floatpane/matcha)'s mail\nreader, where it powers the meeting-invite card and Accept / Decline / Tentative\nreplies.\n\n## Features\n\n- **Flat `Event`.** Summary, times, organizer, attendees, status, recurrence —\n  all on one struct, no property lookups at the call site.\n- **Parse one or many.** `ParseICS` for the first VEVENT (what mail clients\n  want), `Parse` for the whole calendar.\n- **Correct timestamps.** UTC, floating, `TZID`-qualified and `VALUE=DATE`\n  all-day values — including the real-world quirk of a `TZID` wrongly attached to\n  a date-only value, which is ignored rather than silently shifting the day.\n- **iMIP-correct replies.** `GenerateRSVP` reproduces exactly what schedulers\n  expect: `METHOD:REPLY`, only the responding attendee, updated `PARTSTAT`,\n  `RSVP=TRUE`, fresh `DTSTAMP`, and a preserved UID.\n- **Build outgoing invites.** `NewRequest` / `NewCancel` / `Event.Reply` →\n  `Serialize()` to RFC-compliant bytes.\n- **A real recurrence engine.** DAILY/WEEKLY/MONTHLY/YEARLY with INTERVAL,\n  COUNT/UNTIL, BYMONTH, BYMONTHDAY, BYDAY (ordinals like `2MO` / `-1FR`) and\n  BYSETPOS, plus RDATE/EXDATE merging.\n- **Free/busy.** Merge events (recurrences expanded) into busy intervals and the\n  free gaps between them.\n- **Single dependency.** Only `github.com/arran4/golang-ical`.\n\n## Install\n\n```bash\ngo get github.com/floatpane/go-icalendar\n```\n\nRequires Go 1.26+.\n\n## Usage\n\n### Parse an invite\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"log\"\n    \"os\"\n\n    icalendar \"github.com/floatpane/go-icalendar\"\n)\n\nfunc main() {\n    data, err := os.ReadFile(\"invite.ics\")\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    ev, err := icalendar.ParseICS(data)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    fmt.Println(ev.Summary, ev.Start.Local(), \"-\u003e\", ev.End.Local())\n    for _, a := range ev.Attendees {\n        fmt.Printf(\"  %s (%s)\\n\", a.Email, a.PartStat)\n    }\n}\n```\n\n### Reply (RSVP)\n\n```go\n// response: \"ACCEPTED\", \"DECLINED\", \"TENTATIVE\"\nreply, err := icalendar.GenerateRSVP(data, \"me@example.com\", \"ACCEPTED\")\n// Send reply as text/calendar; method=REPLY back to the organizer.\n```\n\n### Build and send an invite\n\n```go\nstart := time.Date(2026, 5, 1, 9, 0, 0, 0, time.UTC)\nev := \u0026icalendar.Event{\n    UID:       \"kickoff@example.com\",\n    Summary:   \"Project kickoff\",\n    Location:  \"Room 1\",\n    Start:     start,\n    End:       start.Add(time.Hour),\n    Organizer: \"me@example.com\",\n    Attendees: []icalendar.Attendee{\n        {Email: \"you@example.com\", PartStat: icalendar.PartStatNeedsAction, RSVP: true},\n    },\n}\nics, err := icalendar.NewRequest(ev).Serialize()\n\n// Later — call it off (bumps SEQUENCE, sets STATUS:CANCELLED):\ncancelICS, err := icalendar.NewCancel(ev).Serialize()\n```\n\n### Expand a recurring event\n\n```go\nev, _ := icalendar.ParseICS(data)\nfor _, t := range ev.Occurrences(time.Now(), time.Now().AddDate(0, 1, 0), 0) {\n    fmt.Println(t.Local())\n}\n\n// Or work with a rule directly:\nr, _ := icalendar.ParseRRule(\"FREQ=MONTHLY;BYDAY=-1FR\") // last Friday monthly\ntimes := r.Between(start, from, to, 0)\n```\n\n### Compute free/busy\n\n```go\nbusy, free := icalendar.FreeBusy(events, from, to)\nfor _, gap := range free {\n    if gap.Duration() \u003e= 30*time.Minute {\n        fmt.Println(\"can meet at\", gap.Start)\n        break\n    }\n}\n```\n\n## Supported RRULE parts\n\n| Part | Status |\n|------|--------|\n| `FREQ` (SECONDLY → YEARLY), `INTERVAL`, `COUNT`, `UNTIL` | ✅ |\n| `BYMONTH`, `BYMONTHDAY` (incl. negatives), `BYDAY` (incl. ordinals), `BYSETPOS`, `WKST` | ✅ |\n| `BYWEEKNO`, `BYYEARDAY` | parsed, ignored during expansion |\n\n## Documentation\n\nFull API reference: [pkg.go.dev/github.com/floatpane/go-icalendar](https://pkg.go.dev/github.com/floatpane/go-icalendar)\n\nGuides and diagrams: see [`docs/`](docs/).\n\n## Sister projects\n\n| Project | Role |\n|---------|------|\n| [floatpane/matcha](https://github.com/floatpane/matcha) | Reference consumer — renders invites and sends RSVPs. |\n| [floatpane/go-secretbox](https://github.com/floatpane/go-secretbox) | Sibling extraction — password-based encryption at rest. |\n\n## Contributing\n\nPRs welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Security\n\nReport vulnerabilities privately via [SECURITY.md](SECURITY.md).\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatpane%2Fgo-icalendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloatpane%2Fgo-icalendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatpane%2Fgo-icalendar/lists"}