A small jQuery plugin to display Hijri date.
$ npm install jquery-hijri-date --saveor
<!-- jquery file -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!-- jquery-hijri-date file -->
<script src="jquery.hijri.date.min.js"></script><!-- date will be displayed here -->
<div class="my-date"></div>1- Default:
$('.my-date').hijriDate();| Prop | Type | Description | Default |
|---|---|---|---|
| showWeekDay | boolean |
Set to true or false to show or hide the day of the week. |
true |
| showGregDate | boolean |
Set to true or false to show or hide the Gregorian date. |
false |
| separator | string |
The separator symbol that appears between the Hijri and Gregorian dates. | '-' |
| weekDayLang | 'ar' | 'en' |
Determine the language for printing the day of the week. | 'ar' |
| hijriLang | 'ar' | 'en' |
Determine the language for printing the Hijri date. | 'ar' |
| gregLang | 'ar' | 'en' |
Determine the language for printing the Gregorian date. | 'ar' |
| correction | number |
Add or subtract one or more days until you get the correct date. | 0 |
2- Customized:
$('.my-date').hijriDate({
showWeekDay: true,
showGregDate: true,
separator: ' | ',
weekDayLang: 'en',
hijriLang: 'en',
gregLang: 'en',
correction: +1
});ISC