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

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

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

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

Your email address will not be published. Required fields are marked *