Tarikh
Reference

Reference

Reach React components, parsing details, TypeScript contracts, examples, and the why behind Tarikh.

Start Here

Use this section when you already know the job and need the implementation details, type surface, or a copy-paste example.

NeedStart here
Semantic React outputReact Components
Server-side parsing and formattingParsing and Server Use
Why Tarikh exists instead of plain IntlIntl Comparison
TypeScript contracts and public typesTypeScript
Copy-paste examplesExamples

Quick Rule

If you want to render dates in React, start with @coreify/tarikh/react.

If you want to understand supported inputs and parsing behavior, open parsing and server use.

If you want to check contracts before wiring the API, open TypeScript.

React Components

ExportUse it for
TarikhDefault semantic <time> rendering
Tarikh.RelativeRelative labels like today, yesterday, and tomorrow
Tarikh.BanglaBangla calendar output in React
Tarikh.HijriHijri calendar output in React

When To Use Tarikh Instead Of Intl

See Intl Comparison for the full side-by-side breakdown of what Intl.DateTimeFormat cannot cover.

TypeScript

TypePurpose
FormatOptionsPrimary object-based formatting contract
TarikhPropsProps for the main React <Tarikh /> component
HIJRI_TIME_ZONESCanonical supported Hijri time zones (Asia/Dhaka, UTC)
Type-level contractWhen using pattern, mode is intentionally disallowed in TypeScript

Common Paths

TaskWhat to read
Render <time> in ReactReact Components
Parse on the server or in scriptsParsing and Server Use
Decide whether Intl is enoughIntl Comparison
Check public types before codingTypeScript
Copy an example into your appExamples

On this page