ZmanimCLI (Command Line Interface)

Moshe Wagner who wrote the Zmanim GUI notified me in August that that he created a command line interface for zmanim using my Zmanim API. The technical approach of using reflection was similar to the way I used reflection in the Zmanim Clock Applet, but he took it to new heights. Sample use of accessing zmanim using his CLI interface is:

moshe@debian:~/Desktop$ java -jar ZmanimCLI.jar sunrise
6:10:28
moshe@debian:~/Desktop$ java -jar ZmanimCLI.jar --date 2010/08/12 tzais72
20:38:15
moshe@debian:~/Desktop$ java -jar ZmanimCLI.jar
Usage: ZmanimCLI [options] [Time]

Options:
       -d      --date <yyyy/mm/dd>             Set date. (Year first!)
       -lat    --latitude <latitude>           Set location's latitude
       -lon    --longitude <longitude>         Set location's longitude
       -e      --elevation <elevation>         Set location's
elevation; Positive only
       -tz     --timezone <timezone>           Set location's TimeZone

Help:
       -h      --help                          Show this help
       -stl    --time-list                     Show common available
times to display
       -ftl    --full-time-list                Show all available
times to display
       -tzl    --timezone-list                 Show available timezones

Example:
       ZmanimCLI --latitude 31.7780 --longitude 35.235149 --elevation
600 --timezone Israel Sunrise
       Will show the sunrise time today in Jerusalem

While your first reaction may be that it is interesting in a theoretical geeky way, but has no practical value, I will quote Moshe’s explanation as to why it is useful:

Why is this useful? Well, first of all it was a nice experiment. But mainly, you can now use Zmanim (although externally), via any language you want, no longer being tied to Java.

Months later, Moshe actually put this to practical use in his C++ based Luach project. This Luach (similar to the known Kaluach) uses the Qt framework. utilizing libhdate for the date stuff (something not offered by the Zmanim API, and the topic of a future Zmanim API FAQ), displaying zmanim using the Zmanim API via CLI for the zmanim calculations. While you would expect such an approach to be slow, using the Luach seemed almost instantaneous. I will post more about his Luach program (recently reviewed at KosherDev.com) at some point in the future.

WordPress Hebrew Date Plugin Has a New Home

The Hebrew date Plugin has not been in active development for a while, and I am pleased to announce that it now has a new home at mikeage.net. Mike added a config page as well as a few new options. The plugin can be downloaded from the WordPress Hebrew dates Plugin Page. As a backup, you can also download it from Mike’s Site. In addition to Mike’s work, Jacob Fresco has used the code to create an additional Jewish Date plugin that displays the current Jewish date. This plugin has since been merged to Mike’s version.
Read the following posts at Mike’s site for more details.

Hebrew Year Conversion

There was a request on the Correspondence page of Remy Landau’s Hebrew Calendar Science and Myths site for a utility that generated “Hebrew Year Number Transliteration”. Since I had already developed the code as part of PhpGedView (now forked and maintained by webtrees) and the hebrew date plugin, I just ported it to JavaScript as a demo.


Year: Include Thousands תשס”ז


New Version of the Hebrew Date Plugin Available

A new version (v0.3.0) of the Hebrew Date Plugin is now available. This fixes the post time formatting issue. The code is crude and relies on the detection of a ‘:’ in the Date String to determine that it is a time and not date. This works well with the default WordPress 1.5 theme (Kubrick). Other themes that use alternate date formatting might not work perfectly with this plugin. It is worth noting that as far as I know, this plugin will only work with WP 1.5. The plugin does not require changes to the theme, and can simply be activated from the Admin plugin screen.

WordPress Hebrew Date Plugin Alpha Release

I just hacked a simple plugin that displays Hebrew dates alongside the current Gregorian dates on posts. This is now active on this site. The alpha quality code (v0.2.0) is now available for your testing. For the most part the code is almost identical to the PHP code that I wrote to display Jewish dates in PhpGedView. While the PhpGedView code has various display options, for the sake of simplicity and the fact that I never wrote any WordPress plugins before, I did not code any of these options yet. Also not done is parsing of the “Month, Year” format of the archive pages. The PhpGedView code has many options such as displaying the dates in

  • Hebrew Only – י"ז סיון תשס"ה
  • Hebrew and Gregorian – June 24th, 2005 – י"ז סיון תשס"ה
  • Hebrew using the Latin characters – 17 Sivan 5765

and more. These may eventually be added to the plugin.