AbsoluteJS

Calendar

@absolutejs/calendarv0.2.0betaFrontend & UX

Date-only calendar ranges and layouts for AbsoluteJS applications

#Installation

BASH
bun add @absolutejs/calendar

#Capabilities

Overview

Framework-independent, date-only calendar mechanics for AbsoluteJS apps. Apps own event models, permissions, interactions and persistence.

Exports: isCalendarDate, addDays, addMonths (clamps the day), dateInZone, weekDates, monthDates (42 cells), formatCalendarDate, and groupByDate (includes an undated bucket). Dates use YYYY-MM-DD; arithmetic and display avoid local-time/DST shifts. Week starts are configurable from Sunday (0) through Saturday (6). dateInZone is the explicit bridge from an instant to a calendar day.

No provider calendars, timers, React or storage dependencies are required. Invalid date input throws for arithmetic and is retained in the undated bucket when grouping.

Provider publishing (server only)

@absolutejs/calendar/providers exports createCalendarPublisher and CalendarProviderError. Supply a Google or Microsoft owner-scoped access token from Auth and a stable UUID event key. publish({ key, title, date, description }, eventId?) creates or updates a private all-day event in the account's primary calendar; remove(key, eventId?) is idempotent. Persist the UUID before calling the provider, then persist the returned ID. Google uses a deterministic event ID; Microsoft uses both transactionId and a queryable extended property to recover ambiguous writes. Requests time out after 20 seconds, reject redirects and expose sanitized errors. There are no attendees, invitations, default reminders or blocked busy time.

Apps own permissions, explicit publication intent, durable scheduling and retention. Auth owns refresh and revocation. This adapter never reads mailbox content or stores credentials. Use a fresh UUID after a completed removal when publishing again.

Outcomes

What you can build

Overview

Framework-independent, date-only calendar mechanics for AbsoluteJS apps. Apps own event models, permissions, interactions and persistence.

Provider publishing (server only)

@absolutejs/calendar/providers exports createCalendarPublisher and CalendarProviderError. Supply a Google or Microsoft owner-scoped access token from Auth and a stable UUID event key. publish({ key, title, date, description }, eventId?) creates or updates a private all-day event in the account's primary calendar; remove(key, eventId?) is idempotent. Persist the UUID before calling the provider, then persist the returned ID. Google uses a deterministic event ID; Microsoft uses both transactionId and a queryable extended property to recover ambiguous writes. Requests time out after 20 seconds, reject redirects and expose sanitized errors. There are no attendees, invitations, default reminders or blocked busy time.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/calendar version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Provider publishing (server only)
@absolutejs/calendar/providers exports createCalendarPublisher and CalendarProviderError. Supply a Google or Microsoft owner-scoped access token from Auth and a stable UUID event key. publish({ key, title, date, description }, eventId?) creates or updates a private all-day event in the account's primary calendar; remove(key, eventId?) is idempotent. Persist the UUID before calling the provider, then persist the returned ID. Google uses a deterministic event ID; Microsoft uses both transactionId and a queryable extended property to recover ambiguous writes. Requests time out after 20 seconds, reject redirects and expose sanitized errors. There are no attendees, invitations, default reminders or blocked busy time.

#@absolutejs/calendar quick start

Partial snippet

# @absolutejs/calendar

TS
import { monthDates, groupByDate } from '@absolutejs/calendar';
const cells = monthDates('2026-09-24');
const { days, undated } = groupByDate(tasks, task => task.due);

#Public entry points

Supported entry points declared by this project’s package manifest. Internal dist paths are not part of the package contract.

Public package entry point declared in package.json.

@absolutejs/calendar@absolutejs/calendar/providers

#Package commands

Scripts declared by this project’s package manifest.

bun run buildbun build src/index.ts src/providers.ts --outdir dist --target browser && tsc --declaration --emitDeclarationOnly --target ES2022 --module ESNext --moduleResolution bundler --skipLibCheck --outDir dist src/index.ts src/providers.ts
bun run testbun test