Hebrew Dates in WordPress


This plugin is now hosted at WordPress.org. Please go there to download it (it can also be automatically installed from your Admin page).

41 responses to “Hebrew Dates in WordPress”

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

  2. חודש טוב!

    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.

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

  4. שלום ותודה

    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?

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

  6. היי מייק
    כאשר אני מפעיל את התוסף הוא תקוע לי על תאריך אחד : ×›”×’ תמוז תשס”×—

    אשמח אם תוכל לעזור לי בעניין

    תודה
    דולב

  7. שבוע טוב,

    I hope you don’t mind that my response is in English; I don’t mind speaking in Hebrew, (or reading), but I find that the mistakes I make while speaking look much worse in print.

    Without seeing your theme code, I can’t give you a definitive answer; what I can do is explain a little about how HebrewDates works, and maybe that will help you.

    What happens is that we add a filter to “the_time” and “get_comment_date”. Based on that, we begin by attempting to parse the string with strtotime(). If that fails, we check if it’s a month, year or just year (for the archive pages).

    If your date is being displayed in Hebrew already (including a Hebrew translation of the secular month), I don’t think this will work. I haven’t found a way to get the requested date directly from wordpress in a consistent way.

  8. A little hack. I changed the following line:
    add_filter(‘the_time’,’jewishDate’); to
    add_filter(‘the_date’,’jewishDate’);

    In my theme I use the_date for the full hebrew date, and the_time is left inact. I use to display the secular date in a variety of formats (like the example in the previous post).

  9. with default theme of wordpress this plugin isn’t working? do you have a theme where you are sure it IS working with? would like to have the normal date & jewish date published after each other.

    Right now have error like: Fatal error: Call to undefined function gregoriantojd() in …/wp/wp-content/plugins/hebrewdate.php on line 142
    which is : $jd = gregoriantojd($month, $day, $year);

    what’s wrong about that line? another theme doesn’t give that error – but doesn’t display the hebrew date.

    thnx!

Leave a Reply to bj Cancel reply

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