Display Today's Date in Muslim Hijri Calendar - hijri.date.js
File Size: | 6.3 KB |
---|---|
Views Total: | 2240 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |

A tiny jQuery plugin that displays today's date in Muslim Hijri Calendar.
See Also:
How to use it:
1. Insert the jquery.hijri.date.js
script after jQuery.
<script src="/path/to/jquery.slim.min.js"></script> <script src="/path/to/jquery.hijri.date.js"></script>
2. Create a container to display the Hijri date.
<div class="example"></div>
3. Call the function on the container you created and done.
$(function(){ $('.example').hijriDate(); }); // => الثلاثاء 11 رجب 1442 هـ
4. Determine whether to display the Gregorian date. Default: false.
$(function(){ $('.example').hijriDate({ showGregDate: true }); }); // => الثلاثاء 11 رجب 1442 هـ - 23 فبراير 2021 م
5. Determine whether to show the day of the week. Default: true.
$(function(){ $('.example').hijriDate({ showWeekDay: false }); });
6. More configurations.
$(function(){ $('.example').hijriDate({ // custom separator separator: '-', // or 'en' weekDayLang: 'ar', hijriLang: 'ar', gregLang: 'ar', // correct the Hijri date correction: 0, }); });
Changelog:
2021-09-22
- Add the ability to correct the Hijri date
This awesome jQuery plugin is developed by MuhammadMabrouk. For more Advanced Usages, please check the demo page or visit the official website.