Update: The WordPress Hebrew Date Plugin Has a New Home!
The Hebrew date plugin is a simple plugin that displays Hebrew dates alongside the current Gregorian dates. The default format currently used is the Gregorian and Hebrew format:
June 24th, 2005 – י"ז סיון תשס"ה
You can optionally output the Hebrew date in the Latin charset (English) to display:
June 24th, 2005 – 17 Sivan 5765
To change this setting, change the line
$jewishDateStyle = "HEBREW_AND_GREGORIAN";
to
$jewishDateStyle = "JEWISH_AND_GREGORIAN";
(Both are in the code but one line is //commented out.)
An other option is the spelling of the Jewish month names when using the Latin charset. This can either use the default Ashkenazi pronunciation of Cheshvan & Teves, or the Sefardic pronunciation of Heshvan and Tevet.
To change to the Sefardic spelling, change:
$useAshkenaziSpelling = true;
to
$useAshkenaziSpelling = false;
Version 0.9 is now available for your testing.
This plugin will output Hebrew and Gregorian dates in WordPress. This has not been tested on WP 1.2 and will probably not work in anything less than 1.5. To activate, unzip, copy to the plugin directory and enable. That’s it. No theme changes should be required.
The code is a drop rough and relies on the detection of a ‘:’ in the Date String to determine that it is a time and not date. This works well with the default WordPress 1.5 theme (Kubrick). Other themes that use alternate date formatting might not work perfectly with this plugin (but probably will work fine).
over all a great plugin, however you seem to have left out a bit of code that deals with leap years. All my posts from adar I are messed up as a result. To see an example of the error message check out:
February Posts
I’d appreciate any updates to this that you are able to do. Like I said I otherwise love the plug-in.
José,
As mentioned in the posting Hebrew Date Plugin Version 0.9 Released, I just uploaded version 0.9 that has the missing function. Please test it and let me know if it works.
I’m new to WordPress and your Hebrew Date Plugin (ver 0.9) and I’m having some trouble. When I activate the plugin it errors out on the site at line 70. It says:
Fatal error: Call to undefined function: gregoriantojd() in /sites/ariellovesdana/html/wordpress/wp-content/plugins/hebrewdate.php on line 70
Am I missing something? Any help would be greatly appreciated. Thanks!
In order to use international date functionality (including Julian dates needed for the conversion of Jewish dates), PHP has to be compiled with
–enable-calendar
You should get in touch with your web hosting company about this.
Shalom KosherJava:
I’ve been using your Hebrew date plugin ever since I started using WordPress, and I really like it.
I’m wondering how easy it would be to add the capability of displaying occasions for the given date, (for instance, any entries displaying 1 Heshvan also displaying Rosh Hodesh, or the days of the week being displayed as “First Day of Parshat … “. Any help you can provide would be appreciated.
Thanks in advance, and g’mar chatimah tovah.
Adding Jewish holidays would not be complex, but it is not something I plan on adding in the near future unless I find a lot of spare time. Doing it would require adding them in both Hebrew and English. A higher priority would be to get the plugin to work with the Hebrew localization of WordPress, something that it does not seem to do now. I’ll keep it in mind for a future version though.
Shalom, Shana Tova!
I am happy to use this plugin it is beautiful thing for my site thank you.
Could you tell me how i can add to my sidebar a date with latin/hebrew so it shows the current date please.
I posted a question but it appears to be delted and unanswered. I want to put in my sidebar the current date like your plugin does in posts. please advise how to do this
I’m just installed & activated Hebrew Date Plugin – my very first WordPress plugin – but I can’t figure out why it doesn’t work. I checked on two different themes. I don’t get an error message; I get nothing.
Nathan,
What version of WordPress are you using? The plugin only works on 1.5. If you are using 1.5, does it wotk with the default theme (my site is using the default)?
I’m using WP 1.5 and yes, Hebrew date seems to work fine on the default theme. On the theme that I’m using, Mike Little’s Journalized-blue, I get the Hebrew date in comments, but nowhere else.
Any idea how to edit the theme or the plugin to get them working together?
Makki,
By looking at your site, it seems that you got it working.
KosherJava yea well i entered it manually i would like it if the plugin would do it for me.
I don’t think a plugin can arbitrarily put a date in a sidebar. such information is always embedded in the theme. Even if there was an automated way to do it, chances are that you would not like the place it ended up in. Embedding it in the theme gives you more control.
I asked Mike Little and here’s what he said:
The plugin only wraps calls to the_time() (and get_comment_date()) and adds the Hebrew date to the end. My theme uses the_date().
To fix it with my theme, you need to replace the call to the_date() with a call to the_time().
In index.php around line 14 replace
`’,”);?>`
with
“
Then in page.php at the end of line 16 replace
` @ on .`
with
`on .`
Just wanted to drop by and point out that Mike Little graciously answered this for me. Here’s what he wrote (sorry about my first try; the code didn’t show up):
The plugin only wraps calls to the_time() (and get_comment_date()) and adds the Hebrew date to the end. My theme uses the_date().
To fix it with my theme, you need to replace the call to the_date() with a call to the_time().
In index.php around line 14 replace
‘,”);?>
with
Then in page.php at the end of line 16 replace
@ on .
with
on .
All right, I obviously can’t manage to make the code appear here. If anyone wants to get the Hebrew Date plugin working with Journalized blue, please look at:
https://wordpress.org/support/topic/hebrew-date-and-journalized-blue/
Nathan,
Thanks for the tip on figuring this out. I have no time to look into this now, but can the plugin wrap calls to the_date()?
Try wrapping the code with the following syntax. Just remove the space after the [ and before the ]
[ code lang=”php” ]
[ /code ]
Do you know how this plugin could be implemented in Textpattern? I would really like to be able to display Hebrew dates on my new site.
Thanks
Your posting was the first I ever heared of Textpattern, though I had no trouble finding it at https://textpattern.com/ . The code is very straight forward and built from code that I wrote for PhpGedView. Support for the Jewish calendar is built into PHP so writing the code was not complex. Turning the code into a WordPress plugin was simply a matter of using the WordPress Plugin Hooks and a few small tweaks. You need to find out how to use similar hooks with Textpattern (assuming that they exist).
Okay, thanks. I’ll look into it.
Hi,
I’m using the Hebrew version of wp (https://he.wordpress.org/). The Hebrew date plugin doesn’t work as expected.
I had to make extreme changes to jewish_date(), and now it works for me. The changes are ont suitable for sending back, but let’s communicate in email if you are interested..
Yuval,
As I mentioned in my comment on the Hebrew WP page, this was not tested with the localized Hebrew version. I am grateful that you not only tested it, but actually fixed it. I will be in touch with you via email on getting the fixes in.
Just wanted to let you know that I used this in WP 1.5 and it’s looking great. Is there a way to disable the Gregorian date?
To disable the Gregorian date change line 99 from
to
Hy everybody, I’m an italian webdesigner, so I start my help request apologizing for my broken english 🙂
Thanx to Kosherjava who give us the plugin. I’m triing to use it for the upcoming site ( http://www.levchadash.info) of a liberal Sinagogue in Milan, Italy.
I installed the plugin, but it doesn’t work.
It prints a fake date: “1 January 1970 – 23 Tevet, 5730” even the time flows 🙂
I use wordpress 2.01, italian version.
I’m not very skilled in PHP.
Maybe the problems are both version and localization of WP?
I home someone can help me.
Thank you in advance,
Shabbat Shalom
Lev,
It is likely the localized version of the plugin. I have not tested it on 2.0, but I do know that others have had no problem with it running on 2.0. If you look at the source code of the plugin on line 44, you will see an array of month names with a comment after it about localization issues. Try replacing that line with Italian, and let me know if it solves your issue. There have also been some theme specific bugs, so I am not sure that this will solve your issue. I have a feeling that changing the array in line 44 might not solve your issue, since there a lot of assumptions in the code regarding date formats that might not be applicable for your local.
Thanks. Works well. I really appreciate your work.
תודה
🙂
Shalom,
I installed hebrew-data-plugin (which seems awesome and very much needed, by the way is there a hebrew calendar wordpress plugin?) and activated it in wordpress 2.1, but I might by a little bit “a wordpress newbie”, coz’ I haven’t a clue how I make it work, so that I can see it. I put $jewishDateStyle to some where, but where in my theme’s code?
As mentioned, this plugin has a new home, and the version here is out of date. Please go to mikeage.net’s Hebrew Dates in WordPress page. If you run into an issue with his latest version, please let mike know. The issue is I am sure related to the Finnish (European) date format that your site is using.
Is it possible not to have the name of the mounth, just the number?
Thanks for a great plugin.
Petrus,
I am happy that you are enjoying the plugin. Your request is not a complicated to implement, but as mentioned above, I no longer maintain the plugin. The latest version is maintained by Mike Miller. Please post at Mike's site regarding this.
Hi,
I am in the process of renovating a website and would need to get an advice on two point :
– how to keep skip gregorian (because day, month and year already appeared, in French on my wordpress theme) ?
– how to make appear at the same time hebrew date format and jewhish date format in latin char ?
I think, having a look at the website will make my issue more understanbable.
Thanks a lot for your help and for this great plugin !
Can I ask you in Hebrew?
I install the plugin & the date go to be 1969? תשל
🙁
help me, what can I do to fix that? (in Hebrew- pls)
תודה
🙂
As stated above in the post and at the WordPress Hebrew Date Plugin Has a New Home post, I no longer maintain the plugin. If I have a chance in the next few weeks I will try to look into your questions.
Hi,
we would like to include both the English and Hebrew date in Gregorian format. Do you have the code in html? or just php?
If you have it in html, can you please provide it for us to use.
Thanks
Sorry for the delay in answering. I am not sure what you mean by
, but here is some information that you can use. Your site seems to use Joomla. I know very little about Joomla, and my plugin (no longer supported here) was designed to work with WordPress. A quick Google search turned up the Hebrew Date Joomla plugin . You can also (assuming that you have PHP 5), use the following line of PHP to add a Hebrew date to your site.
Hello, I’d like to thank you for a wonderful plug-in.
I adopted it for my blog with the theme jp.
For details, you can see here https://kosherdev.com/2009/11/hebrew-date-plugin-jq-them/.
Maybe we could provide UI setting for customized Date formats?
Moishe,
Try contacting Mikeage.net who had been maintaining the recent releases. If he is no longer interested, you may want to pick up the development. Just make sure that you are using his latest 1.0.3 version as your starting point.
איך אני יכול להפוך את הטקסט לעברית ולמצוא תאריכים יותר קודמים מהתאריך הנוכחי
Is there a way to get Omer days via API?
Niso,
Please see getDayOfOmer() in the Java library. Is this what you are looking for?