[Debian-hebrew-common] Fwd: libhdate update

kobi zamir kobi.zamir at gmail.com
Sun May 13 17:36:07 UTC 2012


From: Boruch Baum
Date: Sun, May 13, 2012 at 8:32 PM
Subject: libhdate update
To: kobi.zamir at gmail.com

I've been posting commits to libhdate, and by now there are ALOT of
new features in both of the two utilities hcal and hdate, including
custom holidays, more display options, more zmanim, more flexible
user-entry options, and better location awareness. I plan on preparing
the next official release when I have daylight savings time automated
and add more flexible input of timezones.

Here's a printout of most of the current man page for hdate.1


NAME
      hdate  -  displays Hebrew date information for a given
Gregorian/Julian
      date

SYNOPSIS
      hdate [options] [coordinates] [timezone] [datespec]

      hdate [options] [coordinates] [timezone] [julian_day]

      coordinates -l [N|S]yy[.yyy]     -L [E|W]xx[.xxx]
                  -l [N|S]yy[:mm[:ss]] -L [E|W]xx[:mm[:ss]]
      timezone:   -z nn[(.nn|:mm)]
      datespec:   see section ACCEPTABLE DATE FORMATS

DESCRIPTION
      hdate provides the date according to the Hebrew  calendar,
that  day's
      corresponding  date according to the gregorian calendar, and
optionally
      providess further information about that Hebrew date,
including  holi‐
      days  and astronomical-related times (see section LOCATIONS,
below). If
      no arguments are given, hdate  provides  information  for  the
 current
      date.  If  a single numeric argument is given, hdate interprets
it as a
      year, and provides the requested information for all days of
that year.
      If  two  arguments  are  given, hdate interprets them  as a
month and a
      year, and provides the requested  information  for  all  days
of  that
      month.

      INPUTTING A HEBREW DATE: hdate interprets year values greater
than 3000
      as Hebrew dates. Numeric Hebrew months  are  interpreted  as
1-12  for
      Tishrei - Elul; 13 and 14 for Adar I and Adar II.

      INPUTTING  A  JULIAN DAY: If a single numeric argument is
provided, and
      that argument is greater than 348021, hdate interprets it as a
 "julian
      day  number" and provides information for that Julian day's
correspond‐
      ing Hebrew date. See section JULIAN DAY.

      ACCEPTABLE DATE FORMATS:  Prior  versions  of  hdate  insisted
 on  the
      numeric  date  format  [yyyy[mm[dd]]].   hdate now accepts
numeric date
      elements in any easily discernable  order.  hdate  now  accepts
 Hebrew
      month  names,  and  gregorian  month names in both full and
abbreviated
      formats. Gregorian month names may be entered in either  your
locale's
      language  or  in  English.  Hebrew month names may be entered
in either
      Hebrew characters or  in  transliteration  to  Latin
characters.  When
      receiving  a  datespec  of three two-digit elements, hdate will
make an
      effort to interpret the correct one as a two-digit Hebrew year
 in  the
      current (58th) century. Refer to EXAMPLES below.

OPTIONS
      -b --bidi         output Hebrew information in Hebrew, but in
reverse
         --visual       sequence.

      -d --diaspora     force diaspora readings and holidays.
         --israel       force Eretz Yisroel readings an holidays.

         --daf-yomi

      -h --holidays     print  holiday  name  if  day is a holiday,
and print
                        custom day name if day is marked as a custom
day. See
                        section HOLIDAYS AND CUSTOM DAYS.

      -H                print  only  if day is a holiday or a custom
day, and
                        print the name of that holiday or custom day.

      -i --ical         use iCal formatted output.

      -j --julian       print Julian day number.

      -o --omer         print Sefirat Ha Omer, number of days only.
                        -oo 'today is n days in the omer'
                        -ooo the full text, with weeks and remainder days
         --ba-omer      full omer text, as -ooo, in Hebrew
         --la-omer      full omer text, as -ooo, in Hebrew

      -q --quiet        suppress output, available in four levels:
         --quiet-alerts       -q    suppresses warning messages
         --quiet-gregorian    -qq   also suppresses the gregorian date
         --quiet-descriptions -qqq  also suppresses data labels
         --quiet-hebrew       -qqqq also suppresses the Hebrew date

      -r --parasha      print weekly reading if day is Shabbat.

      -R                print only if day is a Shabbat on which  the
 regular
                        weekly  reading  is  read  (ie. not a special
holiday
                        reading), and print that weekly reading.

         --sun          print sunrise and sunset times.
         --sunrise
         --sunset

      -s --shabbat      print Shabbat start and end  times.  Use  a
specific
                        long option to modify its default.
         --shabbat-times
         --candles      default is 20 minutes before sunset. (17<n<91)
         --candle-lighting
         --havdalah     default is 3 stars. (19<n<91 minutes)

      -S --short-format print using short format.

      -t --times        print day times (three verbosity levels):
         --times-of-day -t   first light, talit, sunrise, mid day,
sunset,
         --day-times         first stars, three stars,
                             and the length of that day's sun-hour.
                        -tt  adds end_Shema_(GR"A), end_amidah,
                             mincha_gedola, mincha_ketana, plag_hamincha.
                        -ttt adds end_Shema_(M"A).

                        Instead   of   using  the  presets,
customize  with:
                        --first-light --midday        --shekia
                        --alot        --noon          --tzeit-hakochavim
                        --talit       --chatzot       --first-stars
                        --netz        --mincha-gedola --three-stars
                        --shema       --mincha-ketana --magen-avraham
                        --amidah      --plag-hamincha --sun-hour

                        --sunrise     --sunset
                        --end-eating-chometz-ma
- --end-eating-chometz-gra
                        --end-owning-chometz-ma
- --end-owning-chometz-gra

      -T --table        print tabular output. All data for each
requested day
         --tabular      will be output on a single comma-delimited
line. Most
                        suitable for piping, or export to spreadsheets

      -l --latitude     [NS]yy[.yyy]  decimal  degrees,  or
[NS]yy[:mm[:ss]]
                        degrees, minutes, seconds. Negative values
are South

      -L --longitude    [EW]xx[.xxx]  decimal  degrees,  or
[EW]xx[:mm[:ss]]
                        degrees, minutes, seconds. Negative values
are West

      -z --timezone     +/-UTC. Notation may  be in decimal  hours
(hh[.hh])
                        or hours, minutes (hh[:mm])

         --hebrew       forces Hebrew to print in Hebrew characters

         --yom          force Hebrew prefix to Hebrew day of week

         --leshabbat    insert parasha between day of week and day

         --leseder      insert parasha between day of week and day

         --not-sunset-aware
                        don't display next day if after sunset

NOTES
  LOCATIONS
      If  you  want  hdate to display accurate time-of-day
information, hdate
      requires location and time zone information in order to make
astronomi‐
      cal calculations for a given date. If you don't provide any
such infor‐
      mation, hdate tries to find out your computer's local time zone
 infor‐
      mation as an indicator, and picks the 'primary' city in that
time zone.
      If hdate can't find local time zone information, hdate  tries
to  find
      out  your  computer's  GMT offset, and either picks from the
list below
      the city in that time zone offset, or defaults to the  equator
 at  the
      center  of that time zone offset. If hdate can't even retrieve
GMT off‐
      set information from your computer, it defaults to Tel-Aviv.
For  other
      locations,  use  the -l -L option pair. For other timezones,
use the -z
      option. Co-ordinates and standard time zones for some common
locations
      are listed below.

      The current defaults are:
           tz                 Lat    Lon      tz              Lat     Lon
           -8   Los Angeles   34.05 -118.25    2    Tel-Aviv  32
 34.75
           -6   Mexico City   19.43  -99.13    3.5  Tehran    35.67
 51.43
           -5   New York City 40.75  -74       4    Moscow    55.75
 37.62
           -4.5 Caracas       10.54  -66.93    5    Tashkent  41.27
 69.22
           -3   Buenos Aires -34.61  -58.37    5.5  Calcutta  22.57
 88.36
            0   London        51.5     0       8    Beijing   39.90
116.38
            1   Paris         48.86    2.34   10    Sydney   -33.87
151.21

      Useful locations and time zones
            tz                 Lat    Lon      tz              Lat
 Lon
            2   Jerusalem     31.78   35.22    8   Hong Kong  22.26
114.15
            2   Haifa         32.82   34.99   -6   Chicago    41.84
- -87.67
            2   Beer Sheva    31.25   34.80   -3   Sao Paolo -23.52
- -46.63
            2   Ashdod        31.80   34.64   -5   Toronto    43.75
- -79.38
            2   Tiberias      40.89   35.84    1   Antwerpen  51.22
 4.42
            2   Eilat         29.56   34.95

  HOLIDAYS AND CUSTOM DAYS
      By  default,  if  you ask hdate to display holiday names
(options -h or
      --holidays),  hdate  uses  libhdate's  data  set  of  the
traditional
      'shulchan  aruch' Hebrew holidays. hdate also creates a
user-modifiable
      config file, custom_days, for any other personal  or  national
 days  a
      user might want to mark. The config file contains detailed
in-line doc‐
      umentation, and allows for simple definitions of custom days by
 either
      the  Hebrew  or  gregorian calendar; by either calendar day of
month or
      nth day of week of month; and provides a simple  method  of
specifying
      how/whether  to  advance/postpone  a  custom  day  should it
occur just
      before, on, or just after the Shabbat.

  JULIAN DAY
      The julian day system is not directly related to the  Julian
calendar.
      Rather,  it was introduced by astronomers for scientific use to
provide
      a single system of dates that could be used when working with
different
      calendars  and  to  unify different historical chronologies.
Julian day
      number (JDN) zero corresponds to January 1, 4713  BCE
Greenwich  noon,
      according to the "julian proleptic calendar".

  TABULAR OUTPUT
      When invoked with option -T ( --table or --tabular ), hdate
outputs the
      requested data for any single day in comma-delimited  format,
with  no
      intervening spaces. The only exception is that holidays and
custom_days
      are delimited from each other with semi-colons, because  there
 may  be
      more  than  one  of those entries for any given day. When
invoked for a
      month (no dd supplied) or a year (no dd or dd supplied), data
for sepa‐
      rate days are new-line-delimited. The first line of tabular
output is a
      header line, describing each field being output, and delimited
 in  the
      same  way  as  the  data line(s). Output of the header line can
be sup‐
      pressed using option -qqq ( --quiet-descriptions ).

FILES
  CONFIG FILES
      The config files and their parent folder will be automatically
created.
      Each file includes its own documentation, in-line. Should you
ever wish
      to restore a config file to its original text, rename  or
delete  your
      current  one; hdate will create a replacement automatically on
its next
      invocation. Both hdate and hcal make use of identically
formatted  cus‐
      tom_days files, so you may freely copy that file from one
config folder
      to the other, or use a symbolic link so both programs will
always  use
      the same custom_days information.

           ${XDG_CONFIG_HOME}/hdate/hdaterc

           ${XDG_CONFIG_HOME}/hdate/custom_days

      If ${XDG_CONFIG_HOME} is undefined:

           ~/.config/hdate/hdaterc

           ~/.config/hdate/custom_days
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debian-hebrew-common/attachments/20120513/d47fc93c/attachment-0001.html>


More information about the Debian-hebrew-common mailing list