-
Notifications
You must be signed in to change notification settings - Fork 0
default
github-actions[bot] edited this page May 30, 2026
·
1 revision
moment-hijri-plus / default
default(
momentInstance):void
Defined in: src/index.ts:150
Install the Hijri plugin into the provided Moment.js instance.
Mutates momentInstance.fn to add instance methods (toHijri, hijriYear,
hijriMonth, hijriDay, isValidHijri, formatHijri) and attaches
momentInstance.fromHijri as a static factory. Call once at application startup.
The call is idempotent: calling it a second time overwrites the methods with identical implementations.
__module
The Moment.js constructor to augment. Pass your imported
moment directly. Works with any moment instance, including locale-scoped ones.
void
import moment from 'moment';
import installHijri from 'moment-hijri-plus';
installHijri(moment);
moment(new Date(2023, 2, 23)).toHijri();
// => { hy: 1444, hm: 9, hd: 1 }moment-hijri-plus · MIT License · npm · Issues
Guides
Examples
Reference
- API Reference
- installHijri
- toHijri
- fromHijri
- formatHijri
- hijriYear / hijriMonth / hijriDay
- isValidHijri
- Architecture
- Benchmarks
Community