Publishing Hindu festival dates as an ICS calendar feed
October 9, 2026 · Updated November 9, 2026
A calendar subscription is the lowest-effort way for a family, a temple or a community group to keep festival dates in front of people. Users paste one URL into Google Calendar, Apple Calendar or Outlook, and dates appear alongside everything else. Getting the format right takes a little care, because calendar clients treat dates and times very differently. This post covers the iCalendar format (RFC 5545) choices that matter for festival feeds.
One feed per location and tradition
Festival dates depend on location (local sunrise and sunset) and sometimes on tradition. So a feed is not "Hindu festivals"; it is "Hindu festivals for Houston, following tradition X". Build one feed per combination and put both in the calendar name:
X-WR-CALNAME:Hindu festivals - Houston (example)
X-WR-TIMEZONE:America/ChicagoX-WR-CALNAME and X-WR-TIMEZONE are widely supported extensions that set the calendar's display name and default zone. The zone line is a hint, not a substitute for correct event dates.
All-day events for festival days
A festival day should be an all-day event. In iCalendar that means a DATE value, not a DATE-TIME:
BEGIN:VEVENT
UID:festival-name-2027-houston@example.com
DTSTAMP:20261009T000000Z
DTSTART;VALUE=DATE:20270115
DTEND;VALUE=DATE:20270116
SUMMARY:Festival name
DESCRIPTION:Computed for Houston (America/Chicago). Rule: <rule text>.
TRANSP:TRANSPARENT
END:VEVENT(The date and names are placeholders.)
Key points:
DTENDfor an all-day event is exclusive: a one-day event ends on the next date.- A
DATEvalue has no timezone. It means "this calendar date wherever the viewer is". That is exactly what you want once you have computed the correct date for the feed's location. TRANSP:TRANSPARENTstops the event from marking users as busy all day.
The common bug is to emit DTSTART:20270115T000000Z, midnight UTC. In the Americas that displays as the evening of the previous day, and the festival appears on the wrong date.
Timed events for windows
Some observances have a time window, for example a period after local sunset. Represent those as timed events in the location's zone:
DTSTART;TZID=America/Chicago:20270115T183000
DTEND;TZID=America/Chicago:20270115T203000With TZID, the feed should include a matching VTIMEZONE component. Many generators include it automatically; if yours does not, emit the times in UTC with a Z suffix instead. Clients convert them to the viewer's zone.
Decide deliberately whether a window event is useful. A day-level all-day event plus the window in the description is often clearer than two events.
Stable UIDs
Every event needs a UID that never changes for that festival occurrence. Calendar clients use it to update events in place. If you regenerate UIDs on every build, subscribers see duplicates or flickering events. Derive the UID from the festival, the year (or occurrence), the location and the tradition.
Updates and corrections
Subscribed calendars are polled by the client, on a schedule you do not control. Google Calendar in particular can take many hours to refresh. Practical consequences:
- Publish the year's dates well in advance.
- If you correct a date, keep the same
UID, change the dates, updateDTSTAMPand incrementSEQUENCE. - Do not rely on a feed for same-day corrections; users may not see them in time.
Put the reasoning in the description
Families will compare your feed with their temple's calendar. Include in each DESCRIPTION:
- the city the date was computed for;
- the tradition, where it matters;
- the rule, in one line;
- a link to a page that explains differences, such as why festival dates differ outside India.
Keep descriptions factual. Describe the calendar, not what the day means for anyone.
Beta and uncertain dates
If a rule for a festival has not been verified, say so in the event itself, for example a summary suffix "(provisional)" and a description line explaining why. It is better than silently publishing a date you are not sure of.
Hosting the feed
- Serve with
Content-Type: text/calendar; charset=utf-8. - Use a stable URL; changing it breaks every subscription.
- Cache at the edge. Feeds are identical for all subscribers of a location, and clients poll repeatedly.
- If the feed is private to a customer, put a revocable read-only token in the URL rather than requiring login, since calendar clients cannot log in.
- Offer
webcal://links for one-click subscribe on Apple devices, and show thehttps://URL for Google Calendar's "From URL" option.
Line folding and escaping
RFC 5545 limits lines to 75 octets and requires longer lines to be folded with a CRLF followed by a space. Commas, semicolons and backslashes in text values must be escaped. Use a library rather than string concatenation: icalendar in Python and ical-generator in Node.js both handle folding and escaping.
Reminders inside the feed
You can attach a VALARM to each event so subscribers get a notification, for example the evening before. Be cautious: some clients ignore alarms in subscribed calendars, others honor them, and users cannot always remove an alarm you set. A safer default is no alarm in the feed, with a note in the calendar description telling users how to add their own default notification for that calendar. If you do include alarms, offer a second feed URL without them.
Testing checklist
- Subscribe in Google Calendar, Apple Calendar and Outlook, with the device set to a zone west of UTC. Check that all-day festivals land on the right date.
- Change a date, keep the UID, bump
SEQUENCE, and confirm the event moves instead of duplicating. - Validate the feed with an iCalendar validator.
- Check a timed window event across a DST change.
Where TithiKit fits
ICS feeds per city are part of TithiKit's planned launch scope, built on the same festival rules as the API, with the rule in each event's description. It is in development; join early access if you would like feeds for your app or community site.