npm.io
0.1.1 • Published 5h ago

@gobrand/calendar-core

Licence
MIT
Version
0.1.1
Deps
2
Size
41 kB
Vulns
0
Weekly
0
Stars
2

Calendar Core

Framework-agnostic, headless calendar state and projections built directly on the Temporal API.

pnpm add @gobrand/calendar-core
import { Temporal } from '@js-temporal/polyfill'
import { buildMonthView, createCalendar } from '@gobrand/calendar-core'

const calendar = createCalendar({
  views: { month: true, week: true },
  date: Temporal.PlainDate.from('2026-07-10'),
  timeZone: 'America/Asuncion',
})

const month = buildMonthView({
  calendar,
  items: events,
  getDate: event => event.date,
})

The controller owns date, active view, timezone-aware half-open query range, and navigation. Item types stay local to buildMonthView, buildWeekView, and buildDayView.

Full documentation: eng.gobrand.app/calendar

MIT Ruben Costa / Go Brand

Keywords