Getting Started
Introduction
Learn what Tarikh does and where to begin.
What Tarikh Covers
If you want the shortest path, start at Getting Started.
@coreify/tarikh helps you show dates in a way that feels natural for
Bangla-speaking users.
At a Glance
| What you need | Where to go |
|---|---|
| Start with the section hub | Getting Started |
| Add the package | Installation |
| Render your first date | Quick Start |
| Pick a date style | Formatting |
| Convert digits or parse dates | Utilities |
| Use React components, types, and examples | Reference |
Main Exports
| Export | What it does |
|---|---|
format() | Format a date as standard, Bangla, Hijri, or hybrid output |
toBanglaCalendar() | Return structured Bangla calendar parts |
toHijriCalendar() | Return structured Hijri calendar parts |
fromNow() | Show labels like yesterday, tomorrow, and in 3 days |
HIJRI_TIME_ZONES | List the supported Hijri timezone values |
Why Tarikh Exists
Tarikh is a good fit when your app needs:
- Bangla calendar dates
- Hijri calendar output
- Bangla digits in user-facing strings
- relative dates like today, yesterday, and tomorrow
- semantic React
<time>output - parsing that understands Bangla calendar text
- SSR-safe formatting that works on the server and client
Design Goals
| Goal | Why it matters |
|---|---|
| Small surface area | You can reach for one formatter instead of many separate utilities |
| SSR-friendly | Dates can be rendered on the server without extra client work |
| Bangla-first output | The default experience matches the language and calendar your users expect |
| Practical formatting | You can handle standard, Bangla, Hijri, and hybrid output in one package |
Tarikh is designed to stay small, SSR-friendly, and easy to use in real applications.