Skip to content

Kind 31922: Date-Based Calendar Event

Overview

Date-based calendar events represent occurrences that start on a specific date and end before a different date in the future. They are appropriate for all-day or multi-day events where time and time zone hold no significance, such as anniversaries, public holidays, and vacation days.

Specification

PropertyValue
Kind Number31922
Event RangeAddressable
Defined inNIP-52

Content Format

The content field should contain a detailed description of the calendar event. While required, it can be an empty string.

Tags

Tag NameDescriptionFormatRequired
dUniversally unique identifier (UUID)["d", "<UUID>"]Yes
titleTitle of the calendar event["title", "<title of calendar event>"]Yes
startInclusive start date in ISO 8601 format["start", "<YYYY-MM-DD>"]Yes
endExclusive end date in ISO 8601 format["end", "<YYYY-MM-DD>"]No
locationLocation of the calendar event["location", "<location>"]No
gGeohash to associate with a searchable physical location["g", "<geohash>"]No
pPubkey of a participant with optional relay URL and role["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>", "<role>"]No
tHashtag to categorize calendar event["t", "<tag>"]No
rReferences / links to web pages, documents, etc.["r", "<url>"]No

Client Behavior

Clients should:

  • Generate a UUID when creating a new date-based calendar event
  • Ensure that the start date is before the end date (if provided)
  • If no end date is provided, treat the calendar event as ending on the same date as the start date
  • Allow users to discover and interact with calendar events

Relay Behavior

Relays should handle these events like any other addressable event, allowing them to be retrieved, updated, and deleted according to standard Nostr protocols.

Use Cases

  • Public holidays
  • Vacation days
  • Anniversaries
  • Multi-day conferences
  • Any event where the specific time of day is not important

Example

json
{
  "id": "fa23ab1bd87c7835cc7cc1e800c0160b5d9b1a271e9a2f9f9744a3ca508fcff7",
  "pubkey": "79dff8f82963424e1852174ed276b6715c4ccc9777e489234a363a43d7c73143",
  "created_at": 1671217411,
  "kind": 31922,
  "tags": [
    ["d", "5371fe41-2964-4f3e-b203-e56009f54729"],
    ["title", "DevFest 2023"],
    ["start", "2023-10-20"],
    ["end", "2023-10-22"],
    ["location", "Mountain View Community Center"],
    ["g", "9q9hv3qqe"],
    ["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245", "", "speaker"],
    ["t", "conference"],
    ["t", "developer"],
    ["r", "https://example.com/devfest2023"]
  ],
  "content": "Annual developer conference covering various technologies and frameworks. Join us for three days of workshops, lectures, and networking opportunities.",
  "sig": "83b426c9761ffd6ca13ecba7c7a547162a4e33906bcdfa91ab227d5874124b975c0e4d6954d242d86d94589fa6c478bce695b68b2933c7e6a7c00f2eff93ddb0"
}

References

Notes

The name tag is deprecated in favor of the title tag but may still be used if title is not available.