1.0.3 • Published 3 years ago

jquery-hijri-date v1.0.3

Weekly downloads
7
License
ISC
Repository
github
Last release
3 years ago

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();

alt text

Options:

PropTypeDescriptionDefault
showWeekDaybooleanSet to true or false to show or hide the day of the week.true
showGregDatebooleanSet to true or false to show or hide the Gregorian date.false
separatorstringThe 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'
correctionnumberAdd or subtract one or more days until you get the correct date.0

2- Customized:

$('.my-date').hijriDate({
  showWeekDay: true,
  showGregDate: true,
  separator: '&nbsp;|&nbsp;',
  weekDayLang: 'en',
  hijriLang: 'en',
  gregLang: 'en',
  correction: +1
});

alt text

License

ISC