jquery-hijri-date

1.0.3 • Public • Published

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:

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: '&nbsp;|&nbsp;',
  weekDayLang: 'en',
  hijriLang: 'en',
  gregLang: 'en',
  correction: +1
});

alt text



License

ISC

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i jquery-hijri-date

      Weekly Downloads

      8

      Version

      1.0.3

      License

      ISC

      Unpacked Size

      9.67 kB

      Total Files

      4

      Last publish

      Collaborators

      • webrouk