-
Notifications
You must be signed in to change notification settings - Fork 0
default
github-actions[bot] edited this page May 30, 2026
·
2 revisions
dayjs-hijri-plus / default
constdefault:PluginFunc
Defined in: src/index.ts:164
Day.js plugin that adds Hijri calendar support.
Register once with dayjs.extend(hijriPlugin). After that, all dayjs()
instances expose .toHijri(), .isValidHijri(), .hijriYear(),
.hijriMonth(), .hijriDay(), and .formatHijri(). The static factory
dayjs.fromHijri(hy, hm, hd) is also added.
All calendar arithmetic is delegated to hijri-core. This plugin adds no conversion logic of its own.
import dayjs from 'dayjs';
import hijriPlugin from 'dayjs-hijri-plus';
dayjs.extend(hijriPlugin);
dayjs('2023-03-23').toHijri();
// => { hy: 1444, hm: 9, hd: 1 }dayjs-hijri-plus · MIT License · npm · Issues
Guides
Examples
Reference
API Pages
- plugin (default)
- toHijri
- isValidHijri
- hijriYear
- hijriMonth
- hijriDay
- formatHijri
- fromHijri
- registerCalendar
Community