Getting Started
Quick Start
Show your first date with Tarikh.
Try It Once
If you just want to see Tarikh working, start here.
import { format, fromNow, toBanglaCalendar } from "@coreify/tarikh";
format("2026-03-31", { mode: "standard" });
// -> "31st Mar 2026"
format("2026-04-14", { mode: "bangla", locale: "bn-BD" });
// -> "১লা বৈশাখ ১৪৩৩ বঙ্গাব্দ"
fromNow(new Date(Date.now() - 86400000), { numeric: "auto" });
// -> "yesterday"
toBanglaCalendar("2026-03-31", { locale: "bn-BD" });
// -> { day: "১৭", month: "চৈত্র", monthIndex: 12, year: "১৪৩২" }Pick the Right Result
| If you want... | Use this |
|---|---|
| A normal date label | format(..., { mode: "standard" }) |
| A Bangla calendar date | format(..., { mode: "bangla" }) |
| A Hijri date | format(..., { mode: "hijri" }) |
| A mixed English/Bangla date | format(..., { mode: "hybrid" }) |
| A relative label | fromNow() |
| The calendar parts themselves | toBanglaCalendar() or toHijriCalendar() |
Next Step
If you want to choose a specific style, go to Formatting.