mikeage.net Logo
mikeage.net/content/software/hebrew-dates-in-wordpress/

mikeage.net @ י"ב אייר תשס"ח

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...

Jump to the Download section!

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:

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).

24 Responses to “Hebrew Dates in Wordpress”

  1. mikeage.net » Blog Archive » Hebrew Date v1.0.1 Posted (PB):

    [...] code can be downloaded Hebrew Dates release page under the Software [...]

  2. mikeage.net » Blog Archive » Hebrew Date 1.0.0 Released Posted (PB):

    [...] install, download the plugin (from here),activate, and [...]

  3. mikeage.net » Blog Archive » Wordpress and Hebrew Dates Posted (PB):

    [...] 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 [...]

  4. mikeage.net » Blog Archive » Small Fix to HebrewDate plugin Posted (PB):

    [...] I've released a small fix to the HebrewDate plugin. The new version is 1.0.2, and is available, at the regular place. [...]

  5. Rahel Said:

    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.

  6. Mike Miller Said:

    חודש טוב!

    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 to the_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.

  7. Rahel Said:

    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.

  8. JohnnyBoy Said:

    Shalom,

    I downloaded and activated this plugin in my wordpress 2.1 blog. How does it work? Should it put some

  9. Mike Miller Said:

    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.

  10. JohnnyBoy Said:

    שלום ותודה

    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. :D

    But thanks anyway!

    P.S. Is there a hebrew calendar plugin for Wordpress?

  11. Rahel Said:

    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.

  12. WordPress Plugins Database » Plugin Details » Hebrew Date Posted (PB):

    [...] Visit [...]

  13. Manele Said:

    thx for this great plugin

  14. היומן רשת at abijahjoy.net » wp upgrade & heeb dates Posted (PB):

    [...] installed Hebrew Dates plugin, which I love. I can't wait till I dig my feet in WordPress and actually start manipulating [...]

  15. Petrus Said:

    Is it possible not to have the name of the mounth, just the number?

    Thanks for a great plugin

  16. Mike Miller Said:

    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.

  17. programe tv Said:

    thx for this great plugin

  18. Leah Said:

    i activated the plugin but then my blog doesn't work - help!

  19. Mike Miller Said:

    Leah,

    Can you be a little more specific what happens? When you deactivate the plugin, does everything return to normal?

  20. bj Said:

    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

  21. Mike Miller Said:

    bj… can you post a link? Are both the English and Hebrew dates wrong, or just one?

  22. bj Said:

    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

  23. Mike Miller Said:

    Hrmm… interesting. Can you tell me how the date is being displayed in your theme?

  24. bj Said:

    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

Leave a Reply

Verification Image

Please type the letters you see in the picture. This field is case-insensitive, and valid letters are A-Z (no numbers)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Quicktags:

Quick Map
Content +
Personal +
Archives +
Site Stuff +
RBS Weather +
Search +
New Images
Visitors
Clustermap
Blogroll

Valid XHTML 1.1!
Printer Friendly Page
 

Last Modified: September 04, 2006 @ 09:11 CST