@gobrand/calendar-core
v0.0.23
Published
Lightweight utility library for building calendars using the Temporal API
Maintainers
Readme
Calendar Core
Framework-agnostic calendar utilities built with the Temporal API. Simple, composable functions for building month, week, and day views.
- Built on Temporal API - No Date objects, no moment.js, no date-fns
- Timezone-aware - Native DST handling with IANA timezones
- Type-safe - Full TypeScript with proper Temporal types
- Framework-agnostic - Use with React, Vue, Svelte, or vanilla JS
- Data-agnostic - Works with any data type through accessor pattern
import { buildMonth, createCalendarAccessor, getWeekdays } from '@gobrand/calendar-core';
const accessor = createCalendarAccessor<Event>({
getDate: (e) => e.date,
});
const month = buildMonth(2025, 1, { weekStartsOn: 1, data: events, accessor });
month.weeks.flat().forEach(day => {
console.log(day.date.toString(), day.items.length);
});Install
pnpm add @gobrand/calendar-coreDocs
eng.gobrand.app/calendar — Full API reference, examples, and guides.
License
MIT © Ruben Costa / Go Brand
