jquery-hijri-date
v1.0.3
Published
A small jQuery plugin to display Hijri date
Downloads
21
Maintainers
Readme
jquery-hijri-date
A small jQuery plugin to display Hijri date.
Install
$ npm install jquery-hijri-date --save
or
<!-- 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>
Examples:
<!-- date will be displayed here -->
<div class="my-date"></div>
1- Default:
$('.my-date').hijriDate();
Options:
| 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
});
License
ISC