Formatting
Hybrid Formatting
Mix English and Bangla in one date string with independent control over digits, month, year, and day.
Start Here
Use hybrid formatting when your interface needs a mixed-language date, such as English numbers with Bangla months.
Quick Rule
If the display must mix languages inside one date string, use hybrid formatting instead of stitching strings yourself.
Example
import { format } from "@coreify/tarikh";
format("2026-03-31", { mode: "hybrid" });
// -> "31 মার্চ 2026"
format("2026-03-31", {
mode: "hybrid",
digits: "bn",
month: "bn",
year: "en"
});
// -> "৩১ মার্চ 2026"What You Can Mix
| Option | What it controls |
|---|---|
digits | The numeral system for the day |
month | The language for the month name |
year | The language for the year |
day | Override day language separately if needed |
Good Fit
Hybrid formatting works well when your product mixes English and Bangla in the same sentence or card.