Hebrew Dates in Wordpress
Introduction
I'd picked up development of the Hebrew Date plugin from KosherJava. Although much of the logic is rewritten, most of the credit goes to KosherJava! I just get credit for the bugs...
Release Notes
New in version 1.0.0: (this release got lost... download a newer one!)
- Database config (instead of coded in the file)
- Configuration screen shows when an update was performed
- Option of showing Hebrew (or transliterated) only, Gregorian - Hebrew, or Hebrew - Gregorian
- Lots of code cleanup.
- Easier to add languages (I'd like to add an academic spelling as well)
- Support for full names (Marcheshvan, Menachem Av)
- XHTML 1.1 compliant! (span rtl)
- Hebrew (default) or Transliterated (Latin character set) characters
- Transliteration according Ashkenazi (default) or Sefardi pronunciation
- Sunset correction enabled or disabled (default) by Latitude / Longitude
New in version 1.0.1:
- Based on an idea I "borrowed" from Jacob Fresco, I've added the ability to insert the current Hebrew Date (with sunset correction!) anywhere in a theme.
Simply add
<?php if (function_exists('hebrewDateCurrent')) { hebrewDateCurrent();} ?>to a theme.
New in version 1.0.2:
- Code no longer breaks things! [fix for
the_time()]
New in version 1.0.3:
- Enhanced currentHebrewDate API (see the help on the config screen, or the discussion proposals here)
- Start of some decent documentation
- Proper URL
ToDo
- International (+Hebrew wordpress) support
- Code cleanup
- Better documentation
Download:
- v.1.0.0 - lost to the ravages of time
- v1.0.1
- v1.0.2
- v1.0.3
- Bleeding edge (what I'm running right now)
Installation:
Unzip the zip file (or rename .phps to .php), copy to /path/to/wordpress/wp-content/plugins/, activate, and configure! Note that sunset correction is disabled by default, since there's no meaningful default value for Latitude / Longitude
Known Bugs:
- May not work on versions before 2.0 (untested)
- The sunset routine cannot take into account GMT, since the wordpress offset is GMT +/-, not a timezone (not to mention the computational nightmare that is the Israeli timezone).
י"ח שבט תשס"ז - February 5, 2007 at 5:07 am
[...] code can be downloaded Hebrew Dates release page under the Software [...]
י"ח שבט תשס"ז - February 5, 2007 at 5:08 am
[...] install, download the plugin (from here),activate, and [...]
י"ח שבט תשס"ז - February 5, 2007 at 5:09 am
[...] Hebrew date! To use, you can either download the bleeding edge version or a stable build from the Hebrew Dates release page under the Software section. Once you have the .php file, simply place in your [...]
כ"ו שבט תשס"ז - February 13, 2007 at 1:33 pm
[...] I've released a small fix to the HebrewDate plugin. The new version is 1.0.2, and is available, at the regular place. [...]
א' אדר תשס"ז - February 18, 2007 at 3:34 pm
Shalom Mike,
Thank you very much for updating this plugin. It was what introduced me to WordPress, and caused me to make the switch. If you need help with the documentation, I'd love to help. Also, will we be able to implement a feature that will allow for the display of occasions along with dates, such as Rosh Hodesh at the beginning of the month along with the date, as well as holidays when they occur? Thanks, and keep up the good work.
א' אדר תשס"ז - February 18, 2007 at 4:42 pm
חודש טוב!
I'm glad you're enjoying the plugin. I've thought about integration with a calender.. perhaps using the Hebcal perl module. The truth is, unless I decided to do something complicated (leining schedule, for example), it would be fairly trivial to add printouts for holidays to the output… lemme think about it, and the next time I have a few hours free, I'll try and hack something out.
Do you have any thoughts on how to display it? That is, I can easily add a new function
getHebrewHoliday(), but do you think it should be integrated into the existing filter applied tothe_date()? My hunch is no, as Holidays are the type of information applied occasionally, and not necessarily as part of every printout, but you're requesting the feature, so you get to tell me!Regarding documentation: please see the config screen, and the notes I wrote for the
currentHebrewDate()API. Any improvements are welcome… I have a habit of getting lazy once the work is done, leaving the documentation somewhat incomplete.ה' אדר תשס"ז - February 22, 2007 at 2:23 pm
I'm thinking it would be best to add that output to the function that you can use to display the Hebrew date anywhere in a theme. Displaying it in the postmetadata would be too much. I haven't had a look at the code yet, so I have no idea how things are structured.
ז' אדר תשס"ז - February 24, 2007 at 10:19 pm
Shalom,
I downloaded and activated this plugin in my wordpress 2.1 blog. How does it work? Should it put some
ח' אדר תשס"ז - February 25, 2007 at 5:02 am
KosherJava's response on his thread is correct.
The plugin attempts to replace all dates (but not times) with their Hebrew equivelant (or Hebrew + secular). The problem is that I don't necessarily have access to the raw date information. For example, if I get "Jan 10th, 2000", I can easily handle that. If, however, I get something like "1.10.2000", should I treat that as Jan 1st or Oct 10? I may be able to extract the information from the configuration in WordPress… let me think about it for a few days.
ח' אדר תשס"ז - February 25, 2007 at 10:42 am
שלום ותודה
I noticed "a bug maybe" in Wordpress 2.1. If I change in Wordpress Dashboard Options, the way how date is shown, it doesn't change it in theme, like in previous version of Wordpress. Or I should check out chmod of my current Wordpress theme files.
But thanks anyway!
P.S. Is there a hebrew calendar plugin for Wordpress?
ט' אדר תשס"ז - February 26, 2007 at 4:07 pm
Shalom Johnnie Boy,
Whether or not the date changes in your theme depends on what template tag is being used in your theme to uotput the time. From what I can tell, the Hebrew date plugin responds to the "the_time" tag, and there are a number of strings one can use to display both the time and date. The Codex has documentation on this.
ט"ו תשרי תשס"ח - September 26, 2007 at 1:51 pm
[...] Visit [...]
ה' שבט תשס"ח - January 11, 2008 at 3:33 pm
thx for this great plugin
י"ח שבט תשס"ח - January 24, 2008 at 12:34 am
[...] installed Hebrew Dates plugin, which I love. I can't wait till I dig my feet in WordPress and actually start manipulating [...]
כ"ב שבט תשס"ח - January 28, 2008 at 8:47 pm
Is it possible not to have the name of the mounth, just the number?
Thanks for a great plugin
כ"ד שבט תשס"ח - January 30, 2008 at 11:05 am
It would be possible… but how would you do the numbering? Tishrei = 1, or Nissan = 1?
If you want to try it, you can try replacing one of the types (probably either Ashkenaz or Sefard, depending on which you don't use) with numbers.
Good luck.
כ"ח שבט תשס"ח - February 3, 2008 at 10:59 pm
thx for this great plugin
א' אדר א' תשס"ח - February 6, 2008 at 3:23 am
i activated the plugin but then my blog doesn't work - help!
א' אדר א' תשס"ח - February 6, 2008 at 6:47 am
Leah,
Can you be a little more specific what happens? When you deactivate the plugin, does everything return to normal?
כ"ט אדר א' תשס"ח - March 5, 2008 at 10:55 pm
Hello,
Just installed the plugin , but I seem to be getting the wrong dat - it reverts the date back to 1961. HOw can I fix this
Thanks
ל' אדר א' תשס"ח - March 6, 2008 at 4:00 am
bj… can you post a link? Are both the English and Hebrew dates wrong, or just one?
ט' אדר ב' תשס"ח - March 15, 2008 at 9:06 pm
Both English and Hebrew dates are wrong. I'm using Hebrew wordpress version 2.3.2. When the plugin is not activated I get the correct date. When I activate the plugin, both dates go bate to 1961. you can look at http://www.yomilimud.com/moad/
Thanks
ט' אדר ב' תשס"ח - March 15, 2008 at 10:08 pm
Hrmm… interesting. Can you tell me how the date is being displayed in your theme?
כ"ג ניסן תשס"ח - April 27, 2008 at 7:31 pm
Hi Mike,
Not really, I'm using a theme that I downloaded form the net called "ElegantBlue" other then that I do not know. But any help will would be great as I would really like to have the hebrew date in my blog.
Thanks
bj