Plugin Directory


Hijri Date

A Wordpress Plugin

From Usayd Networks, learn more about it here.

Peace be with you all.

I have recently been working on a new plugin. I started this plugin because it was the month of Ramadan in the Hijri (Islamic) calendar and I thought it would be nice to show what was posted in each month on the Hijri Calendar. Thankfully I had already acquired a script which calculated the hijri date using php in the past so my main aim was to implement this in the plugin to make it calculate the hijri date as well as the georgian date. This plugin is a much more complicated one then my first ones; Random Hadith and Random Qur'an. I wanted to be a little ambitious so I made this new plugin have a few extra features.


  • It gives you the choice of showing the Hijri and Georgian date together, or both of them on their own.
  • It also allows you to change the format of the displayed date to suit your liking.
  • You can add before, seperator and after text or HTML.
  • All of this is done with an extra menu in the administration panel.


This plugin is running on my homepage.


  1. Download the ZIP and Extract.
  1. Upload the unnhijridate.php file to your plugins directory (wp-content/plugins)
  1. Go to your Wordpress administration area and activate the plugin.
  1. Go to your Options menu and select 'HijriDate'
  1. Customise your dates.
  1. Substitute < ?php show_hijridate(); ?> for < ?php the_time(); ?> where ever you wish the plugin to output the date and time. (Usually index.php).

Other links

Hijri Date Plugin is listed on the following:


  1. Why is nothing displayed when I put the 'unn_hijridate()' function in my template?
  1. Did you go to the options page at least once after installing the plugin? If not, the default replacement strings haven't been set up yet. Go to your dashboard, click options and

select 'HijriDate'. This should solve your problem.

  1. How do I make my HijriDate like yours on the homepage?
  1. Probably for advanced users: show_hijridate takes the following parameters to make use of each of the three variables induvidually; Day, Month and Year for both Hijri and Georgian dates.


<?php show_hijridate('%02d %s %d', '%d %B %Y', '') ?>

And then wrap it in whatever CSS you like. If you get stuck feel free to contact me.

I really like this plugin, can I donate to you?

There are many people in the world who are much worse of then me. Donate to Islamic Relief, http://www.islamic-relief.com/.

Who contributed to this project?

I had the idea for the plugin and programmed the 'bulk' of the code, though that isn't much ;)

This plugin uses a PHP script to calculate the Hijri date which was programmed by an unknown source. Once this source is known it will be given the appropriate recognition.

-> Splee's date plugin

-> Simons Footnotes plugin

-> io_error gave a lot of constructive criticism

-> s_g helped loads with the coding

-> Steven gave some ideas

-> Other people on #wordpress

© Usayd Networks 2005.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Last modified 12 years ago Last modified on 04/06/06 22:00:58