Tarikh
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

ConstantPurpose
BANGLA_CALENDAR_MONTHSBangla month names in Bangla script
BANGLA_CALENDAR_MONTHS_ENBangla month names in Latin transliteration
BANGLA_CALENDAR_MONTH_DAYSBase day counts for the Bangla calendar months
BANGLA_MONTHS_FULL / BANGLA_MONTHS_SHORTBangla month names for standard formatting
BANGLA_WEEKDAYS_FULL / BANGLA_WEEKDAYS_SHORTBangla weekday names
ENGLISH_MONTHS_FULL / ENGLISH_MONTHS_SHORTGregorian month names
ENGLISH_WEEKDAYS_FULL / ENGLISH_WEEKDAYS_SHORTGregorian weekday names
BOISHAKH_START_DAY / BOISHAKH_START_MONTHBangla calendar year boundary

Digit Constants

ConstantPurpose
BANGLA_DIGITSBangla numeral map
ENGLISH_DIGITSEnglish numeral map

Relative Time Constants

ConstantPurpose
RELATIVE_TIME_ENEnglish relative-time labels
RELATIVE_TIME_BNBangla relative-time labels

Hijri Time Zones

ConstantPurpose
HIJRI_TIME_ZONESSupported 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.

On this page