mikeage.net Logo
mikeage.net/2006/10/22/wordpress-and-hebrew-dates/

mikeage.net @ כ״ו כסלו תשע״ה

WordPress and Hebrew Dates

I've modified the Hebrew Dates plugin from KosherJava slightly, so that all configuration data is now stored in the database (not hard coded into the PHP file). Additionally, it can now compute the dates of posts or comments based on local sunset time. That way, comments made in the evening will be assigned the the proper 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 wordpress/wp-content/plugins folder and activate!
Configuration Options:

  • Hebrew (default) or Transliterated (Latin character set) characters
  • Transliteration according Ashkenazi (default) or Sefardi pronunciation
  • Sunset correction enabled or disabled (default) by Latitude / Longitude

The sunset correction is disabled by default, since there's no meaningful default value for latitude longitude.

15 Responses to “WordPress and Hebrew Dates”

  1. mikeage.net says:

    More Hebrew Dates Updates…

    I've added a few more things to the Hebrew Dates plugin patches I mentioned earlier: Configuration screen shows when an update was performed, option of showing Hebrew (or transliterated) only, Gregorian – Hebrew, or Hebrew – Gregorian, and some ge…

  2. mikeage.net says:

    Even more changes to Hebrew Dates!…

    Latest changes:

    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)

    ……

  3. KosherJava says:

    I am very grateful that you picked up development of the plugin. I have not had much time lately to keep it up to date, and it is nice that it is being actively developed. I was new to WordPress and some of the code shows it. The way it parses dates reflected my lack of ability to get to the native unformatted date. If this were ever fixed, it would likely work in other languages as well. There must have been a reason I did it this way, though the reasoning escapes me at the time (I haven't really looked at it in a long time). Do you have any additional plans for the plugin? Keep me posted. As far as track back, it is probably the overzealous spam filters that prevent them from working, so I am cross posting this to my blog.

    KosherJava

  4. Mike Miller says:

    [Also cross-posted]
    I'm not sure what else needs to be done; the date does need some work (Internally, I use get_the_date to get the date/time of the post, and get_comment_date); I'll try playing with that.

    The other big issue is formatting. At the moment, it's hard coded as DD MMM YYYY (or something similar for archives). If the entire date is English (numbers + transliteration), it works just fine. If the entire thing is Hebrew, it also works just fine without needed a span/rtl. If, however, we have numbers + Hebrew, it shows up in the wrong order (17 מרחשון 5756) (numbers are weakly directional in the bidi algorithm), and so I add a tag. I'm also not sure there's a need for Hebrew formatting that's not either 17 Marchesvan 5767 or 17 מרחשון 5756 (in all Hebrew, it's of course always ב' מרחשון תשס"ז). I've put up a screen shot of the current config options as well.

  5. KosherJava says:

    You can fix the numeric/Hebrew issue with the use of ‏ and ‎ (too tired to remember the exact use, but I have used it in the past), but I really think that such formatting options are not likely to be used, and the effort would be better spent on other areas of the code.

  6. Mike Miller says:

    [I've edited your comment to turn & into & ;) ]

    Any suggestions for other improvements? I'll be glad to try and look into something else (in addition to the time retreival).

    The sunset calculation was the biggest thing; I think that's a rather nice feature. It still will mess up around DST, b/c wordpress only uses an offset, not a timezone, but there's nothing I can do about that.

  7. Mike Miller says:

    Can I ask if you've adopted my version? I've avoided releasing it as either a fork, or publicizing it beyond a few comments here and there, but I think it does everything the original does, plus a lot more; would you like to make it an official 0.9.2?

  8. KosherJava says:

    I have not updated my site to use the new code, but I would be glad to have you release an official version. You can host it here and I can either host a copy, or simply link to here. My original version is no longer in active development.

  9. mikeage.net says:

    Hebrew Date 1.0.0 Released…

    As you may have seen earlier, I'd picked up development of the Hebrew Date plugin from KosherJava. Today, I'm officially releasing version 1.0.0. Much of the logic is rewritten, but most of the credit goes to KosherJava!
    To install, download …

  10. Mike Miller says:

    I'll see if I can update the various plugin sites; some still have your plugin at 0.8!
    I can't update at at wp-plugins or the codex's list. Can you please do that?

    Thanks

  11. KosherJava says:

    I can't seem to get in both sites. I will try to get access. Any thoughts on the sidebar Hebrew date?

  12. mikeage.net says:

    Hebrew Date v1.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(…

  13. Div says:

    I am very grateful that you picked up development of the plugin. I have not had much time lately to keep it up to date, and it is nice that it is being actively developed. I was new to WordPress and some of the code shows it. The way it parses dates reflected my lack of ability to get to the native unformatted date. If this were ever fixed, it would likely work in other languages as well. There must have been a reason I did it this way, though the reasoning escapes me at the time (I haven't really looked at it in a long time). Do you have any additional plans for the plugin? Keep me posted. As far as track back, it is probably the overzealous spam filters that prevent them from working, so I am cross posting this to my blog.
    +1

Leave a Reply

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

Valid XHTML 1.1!
Printer Friendly Page
 

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

Memory(TRUE): 1835008/1835008
Memory(FALSE): 1556308/1588564