Utilities
Constants
Exported month, weekday, digit, calendar, relative-time, and timezone constants.
Start Here
Tarikh exports the data behind the formatter so you can build custom output without reimplementing the calendar tables.
Quick Rule
Use these constants when you want to build your own UI around Tarikh data, not when you just need a formatted string.
Constant Groups
import {
BANGLA_CALENDAR_MONTHS,
BANGLA_CALENDAR_MONTHS_EN,
BANGLA_CALENDAR_MONTH_DAYS,
BANGLA_DIGITS,
BANGLA_MONTHS_FULL,
BANGLA_MONTHS_SHORT,
BANGLA_WEEKDAYS_FULL,
BANGLA_WEEKDAYS_SHORT,
ENGLISH_DIGITS,
ENGLISH_MONTHS_FULL,
ENGLISH_MONTHS_SHORT,
ENGLISH_WEEKDAYS_FULL,
ENGLISH_WEEKDAYS_SHORT,
HIJRI_TIME_ZONES,
RELATIVE_TIME_BN,
RELATIVE_TIME_EN
} from "@coreify/tarikh";Calendar Constants
| Constant | Purpose |
|---|---|
BANGLA_CALENDAR_MONTHS | Bangla month names in Bangla script |
BANGLA_CALENDAR_MONTHS_EN | Bangla month names in Latin transliteration |
BANGLA_CALENDAR_MONTH_DAYS | Base day counts for the Bangla calendar months |
BANGLA_MONTHS_FULL / BANGLA_MONTHS_SHORT | Bangla month names for standard formatting |
BANGLA_WEEKDAYS_FULL / BANGLA_WEEKDAYS_SHORT | Bangla weekday names |
ENGLISH_MONTHS_FULL / ENGLISH_MONTHS_SHORT | Gregorian month names |
ENGLISH_WEEKDAYS_FULL / ENGLISH_WEEKDAYS_SHORT | Gregorian weekday names |
BOISHAKH_START_DAY / BOISHAKH_START_MONTH | Bangla calendar year boundary |
Digit Constants
| Constant | Purpose |
|---|---|
BANGLA_DIGITS | Bangla numeral map |
ENGLISH_DIGITS | English numeral map |
Relative Time Constants
| Constant | Purpose |
|---|---|
RELATIVE_TIME_EN | English relative-time labels |
RELATIVE_TIME_BN | Bangla relative-time labels |
Hijri Time Zones
| Constant | Purpose |
|---|---|
HIJRI_TIME_ZONES | Supported Hijri time zones: Asia/Dhaka and UTC |
The constants are useful when you need custom date components or want to precompute labels outside the default formatter.