Small Fix to HebrewDate plugin


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


12 responses to “Small Fix to HebrewDate plugin”

  1. Mike,
    I noticed that if I echo out with the new 1.0.2 version that it just echos out the time (2:10). Unrelated to the new version, but in 1.0.1 if I have the plugin set to pick up the sunset changes, shows tomorrow’s Hebrew date today. My server is in GMT -8 (California) while my WordPress is set to GMT -5. Any ideas?

  2. Looks like using <code> did not work.

    Mike,
    I noticed that if I echo out <?php the_time(); ?> with the new 1.0.2 version that it just echos out the time (2:10). Unrelated to the new version, but in 1.0.1 if I have the plugin set to pick up the sunset changes, <?php the_time(); ?> shows tomorrow’s Hebrew date today. My server is in GMT -8 (California) while my WordPress is set to GMT -5. Any ideas?

  3. A quick note on ; if you want the angle brackets to show up, use . I had a preview plugin, but it’s broken with WordPress 2.1.

    First, regarding the_time. The plugin wraps the_time, only; not the_date. If it finds a colon without a comma, it assumes that it’s just outputting a time, and not a date, and thus does not do anything (as per your original code). This is necessary to handle printing of dates and times; in my theme, I use:
    Posted on at to handle the printout of date/time. For comments, the plugin also traps comment_date(), but not comment_time(). Does that help?

    Regarding the sunset issue… I don’t know exactly why. My server is in GMT-8, and wordpress is set to GMT+2, and it works for me ;). Is it wrong for the entire day, or does it just switch early?

  4. Mike sorry for the confusion. I had been using the_time when I meant to try to output the current time in the header (see the top left corner of my site) and not the time of the last post. This has been rectified by using the slightly more verbose, but correct:

    <?php echo date(get_settings(‘date_format’));?>- <?php if (function_exists(‘hebrewDateCurrent’)) {echo ” – “; hebrewDateCurrent();} ?>

    The issue with the time of sunset might have been related and I will test this tomorrow. I would suggest displaying a link to the download page and the current version of the plugin in the plugin options page. You should consider adding a function currentDate() (maybe there should be a better name) that would echo out the date the same way that I displayed above (based on the users prefered display of Hebrew dates). This would be in addition to the hebrewDateCurrent(); Sample usage of hebrewDateCurrent() should be part of the preference page, for lack of a better place to put it.

  5. Please take a look at http://mikeage.net/test-page/ and see if this is what you were referring to.

    currentHebrewDate now accepts two parameters:
    The first is either a standard php date() formatting string, or the literal “date_format”, which will cause it to use the WordPress default. The second is either “before” or “after”, and controls where the Hebrew Date is placed. The default, if either is not defined, is to output only the Hebrew Date (legacy behavior).

    If you like it, I’ll release 1.0.3 today (including some better documentation)

  6. What you built is nice but probably overkill. Why do

    hebrewDateCurrent(“date_format”,”after”): February 14, 2007-×›”×– שבט תשס”×–
    hebrewDateCurrent(“F y H:m”,”after”): February 07 11:02-×›”×– שבט תשס”×–

    return different values?
    the pwer usage in the test site is nice but overly complicated to non developers. I think that there should be 2 ways to get the the value in a very simple manned. The hebrew only and that would depend on the setting to pick up “Character Set” settings, and a way to echo out the current time based on the setting in both the Character Set and Display Style.

  7. not only is it nice, but it only took about 15 minutes 😉
    They return different values since my date_format string is not F y H:m. That’s actually a fairly useless format; it was chosen at random. Maybe I can add a third value (“default”) which will output the same value you’d get from the_time() within The Loop.

  8. Default would be nice.
    hebrewDateCurrent() – would output Just the Hebrew date based on the charset selected by the user in the config (either ×›”×– שבט תשס”×– or 27 Shevat 5767)
    hebrewDateCurrent(‘default’) – would output it in the same format that is used by the_time() within the loop
    …. for all the rest of the formats in the test page (including setting the charest, before/after, menachem av VS Av, meaning that there should probably be a way to set the config via this function, but that might be too complex. Whatever is done, it should be documented.
    On the TODO should be support for Hebrew WordPress, as well as other languages.
    One place to look for ideas are the Hirji and Jalali plugins linked at http://codex.wordpress.org/Plugins/Time .

  9. Mike,
    I made some changes to the plugin provided by Kosherjava, you might be interested.
    You can see it here http://kosherdev.com/2009/11/hebrew-date-plugin-jq-them/
    But unfortunately, I found your continuation of development too late, that is why my changes were applied only to version 0.9.

    Now, I work on development of Zmanim Widget (http://kosherdev.com/category/dev/zmanim-widget/) and I use there some functions from Hebrew date plugin. We could work together on these projects, due to using common functions set.

Leave a Reply to Mike Miller Cancel reply

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