calendar
Format a date in local timezone using calendar-based representations.
calendar()
Format a date in local timezone using calendar-based representations.
Signature
calendar(baseDate?: ChronosInput): stringParameters
baseDate: Reference date (default: now)
Return Type
string - Human-readable relative date
Notes
- Returns strings like "Today at 3:00 PM", "Yesterday at 2:30 AM"
Example
playground.ts
Last updated: Wed, May 20, 2026 05:38:36PM (UTC)
