<div dir="ltr"><br><div class="gmail_quote">From: <b class="gmail_sendername">Boruch Baum</b><br>Date: Sun, May 13, 2012 at 8:32 PM<br>Subject: libhdate update<br>To: <a href="mailto:kobi.zamir@gmail.com">kobi.zamir@gmail.com</a><br>
<br>
I've been posting commits to libhdate, and by now there are ALOT of<br>
new features in both of the two utilities hcal and hdate, including<br>
custom holidays, more display options, more zmanim, more flexible<br>
user-entry options, and better location awareness. I plan on preparing<br>
the next official release when I have daylight savings time automated<br>
and add more flexible input of timezones.<br>
<br>
Here's a printout of most of the current man page for hdate.1<br>
<br>
<br>
NAME<br>
hdate - displays Hebrew date information for a given<br>
Gregorian/Julian<br>
date<br>
<br>
SYNOPSIS<br>
hdate [options] [coordinates] [timezone] [datespec]<br>
<br>
hdate [options] [coordinates] [timezone] [julian_day]<br>
<br>
coordinates -l [N|S]yy[.yyy] -L [E|W]xx[.xxx]<br>
-l [N|S]yy[:mm[:ss]] -L [E|W]xx[:mm[:ss]]<br>
timezone: -z nn[(.nn|:mm)]<br>
datespec: see section ACCEPTABLE DATE FORMATS<br>
<br>
DESCRIPTION<br>
hdate provides the date according to the Hebrew calendar,<br>
that day's<br>
corresponding date according to the gregorian calendar, and<br>
optionally<br>
providess further information about that Hebrew date,<br>
including holi‐<br>
days and astronomical-related times (see section LOCATIONS,<br>
below). If<br>
no arguments are given, hdate provides information for the<br>
current<br>
date. If a single numeric argument is given, hdate interprets<br>
it as a<br>
year, and provides the requested information for all days of<br>
that year.<br>
If two arguments are given, hdate interprets them as a<br>
month and a<br>
year, and provides the requested information for all days<br>
of that<br>
month.<br>
<br>
INPUTTING A HEBREW DATE: hdate interprets year values greater<br>
than 3000<br>
as Hebrew dates. Numeric Hebrew months are interpreted as<br>
1-12 for<br>
Tishrei - Elul; 13 and 14 for Adar I and Adar II.<br>
<br>
INPUTTING A JULIAN DAY: If a single numeric argument is<br>
provided, and<br>
that argument is greater than 348021, hdate interprets it as a<br>
"julian<br>
day number" and provides information for that Julian day's<br>
correspond‐<br>
ing Hebrew date. See section JULIAN DAY.<br>
<br>
ACCEPTABLE DATE FORMATS: Prior versions of hdate insisted<br>
on the<br>
numeric date format [yyyy[mm[dd]]]. hdate now accepts<br>
numeric date<br>
elements in any easily discernable order. hdate now accepts<br>
Hebrew<br>
month names, and gregorian month names in both full and<br>
abbreviated<br>
formats. Gregorian month names may be entered in either your<br>
locale's<br>
language or in English. Hebrew month names may be entered<br>
in either<br>
Hebrew characters or in transliteration to Latin<br>
characters. When<br>
receiving a datespec of three two-digit elements, hdate will<br>
make an<br>
effort to interpret the correct one as a two-digit Hebrew year<br>
in the<br>
current (58th) century. Refer to EXAMPLES below.<br>
<br>
OPTIONS<br>
-b --bidi output Hebrew information in Hebrew, but in<br>
reverse<br>
--visual sequence.<br>
<br>
-d --diaspora force diaspora readings and holidays.<br>
--israel force Eretz Yisroel readings an holidays.<br>
<br>
--daf-yomi<br>
<br>
-h --holidays print holiday name if day is a holiday,<br>
and print<br>
custom day name if day is marked as a custom<br>
day. See<br>
section HOLIDAYS AND CUSTOM DAYS.<br>
<br>
-H print only if day is a holiday or a custom<br>
day, and<br>
print the name of that holiday or custom day.<br>
<br>
-i --ical use iCal formatted output.<br>
<br>
-j --julian print Julian day number.<br>
<br>
-o --omer print Sefirat Ha Omer, number of days only.<br>
-oo 'today is n days in the omer'<br>
-ooo the full text, with weeks and remainder days<br>
--ba-omer full omer text, as -ooo, in Hebrew<br>
--la-omer full omer text, as -ooo, in Hebrew<br>
<br>
-q --quiet suppress output, available in four levels:<br>
--quiet-alerts -q suppresses warning messages<br>
--quiet-gregorian -qq also suppresses the gregorian date<br>
--quiet-descriptions -qqq also suppresses data labels<br>
--quiet-hebrew -qqqq also suppresses the Hebrew date<br>
<br>
-r --parasha print weekly reading if day is Shabbat.<br>
<br>
-R print only if day is a Shabbat on which the<br>
regular<br>
weekly reading is read (ie. not a special<br>
holiday<br>
reading), and print that weekly reading.<br>
<br>
--sun print sunrise and sunset times.<br>
--sunrise<br>
--sunset<br>
<br>
-s --shabbat print Shabbat start and end times. Use a<br>
specific<br>
long option to modify its default.<br>
--shabbat-times<br>
--candles default is 20 minutes before sunset. (17<n<91)<br>
--candle-lighting<br>
--havdalah default is 3 stars. (19<n<91 minutes)<br>
<br>
-S --short-format print using short format.<br>
<br>
-t --times print day times (three verbosity levels):<br>
--times-of-day -t first light, talit, sunrise, mid day,<br>
sunset,<br>
--day-times first stars, three stars,<br>
and the length of that day's sun-hour.<br>
-tt adds end_Shema_(GR"A), end_amidah,<br>
mincha_gedola, mincha_ketana, plag_hamincha.<br>
-ttt adds end_Shema_(M"A).<br>
<br>
Instead of using the presets,<br>
customize with:<br>
--first-light --midday --shekia<br>
--alot --noon --tzeit-hakochavim<br>
--talit --chatzot --first-stars<br>
--netz --mincha-gedola --three-stars<br>
--shema --mincha-ketana --magen-avraham<br>
--amidah --plag-hamincha --sun-hour<br>
<br>
--sunrise --sunset<br>
--end-eating-chometz-ma<br>
- --end-eating-chometz-gra<br>
--end-owning-chometz-ma<br>
- --end-owning-chometz-gra<br>
<br>
-T --table print tabular output. All data for each<br>
requested day<br>
--tabular will be output on a single comma-delimited<br>
line. Most<br>
suitable for piping, or export to spreadsheets<br>
<br>
-l --latitude [NS]yy[.yyy] decimal degrees, or<br>
[NS]yy[:mm[:ss]]<br>
degrees, minutes, seconds. Negative values<br>
are South<br>
<br>
-L --longitude [EW]xx[.xxx] decimal degrees, or<br>
[EW]xx[:mm[:ss]]<br>
degrees, minutes, seconds. Negative values<br>
are West<br>
<br>
-z --timezone +/-UTC. Notation may be in decimal hours<br>
(hh[.hh])<br>
or hours, minutes (hh[:mm])<br>
<br>
--hebrew forces Hebrew to print in Hebrew characters<br>
<br>
--yom force Hebrew prefix to Hebrew day of week<br>
<br>
--leshabbat insert parasha between day of week and day<br>
<br>
--leseder insert parasha between day of week and day<br>
<br>
--not-sunset-aware<br>
don't display next day if after sunset<br>
<br>
NOTES<br>
LOCATIONS<br>
If you want hdate to display accurate time-of-day<br>
information, hdate<br>
requires location and time zone information in order to make<br>
astronomi‐<br>
cal calculations for a given date. If you don't provide any<br>
such infor‐<br>
mation, hdate tries to find out your computer's local time zone<br>
infor‐<br>
mation as an indicator, and picks the 'primary' city in that<br>
time zone.<br>
If hdate can't find local time zone information, hdate tries<br>
to find<br>
out your computer's GMT offset, and either picks from the<br>
list below<br>
the city in that time zone offset, or defaults to the equator<br>
at the<br>
center of that time zone offset. If hdate can't even retrieve<br>
GMT off‐<br>
set information from your computer, it defaults to Tel-Aviv.<br>
For other<br>
locations, use the -l -L option pair. For other timezones,<br>
use the -z<br>
option. Co-ordinates and standard time zones for some common<br>
locations<br>
are listed below.<br>
<br>
The current defaults are:<br>
tz Lat Lon tz Lat Lon<br>
-8 Los Angeles 34.05 -118.25 2 Tel-Aviv 32<br>
34.75<br>
-6 Mexico City 19.43 -99.13 3.5 Tehran 35.67<br>
51.43<br>
-5 New York City 40.75 -74 4 Moscow 55.75<br>
37.62<br>
-4.5 Caracas 10.54 -66.93 5 Tashkent 41.27<br>
69.22<br>
-3 Buenos Aires -34.61 -58.37 5.5 Calcutta 22.57<br>
88.36<br>
0 London 51.5 0 8 Beijing 39.90<br>
116.38<br>
1 Paris 48.86 2.34 10 Sydney -33.87<br>
151.21<br>
<br>
Useful locations and time zones<br>
tz Lat Lon tz Lat<br>
Lon<br>
2 Jerusalem 31.78 35.22 8 Hong Kong 22.26<br>
114.15<br>
2 Haifa 32.82 34.99 -6 Chicago 41.84<br>
- -87.67<br>
2 Beer Sheva 31.25 34.80 -3 Sao Paolo -23.52<br>
- -46.63<br>
2 Ashdod 31.80 34.64 -5 Toronto 43.75<br>
- -79.38<br>
2 Tiberias 40.89 35.84 1 Antwerpen 51.22<br>
4.42<br>
2 Eilat 29.56 34.95<br>
<br>
HOLIDAYS AND CUSTOM DAYS<br>
By default, if you ask hdate to display holiday names<br>
(options -h or<br>
--holidays), hdate uses libhdate's data set of the<br>
traditional<br>
'shulchan aruch' Hebrew holidays. hdate also creates a<br>
user-modifiable<br>
config file, custom_days, for any other personal or national<br>
days a<br>
user might want to mark. The config file contains detailed<br>
in-line doc‐<br>
umentation, and allows for simple definitions of custom days by<br>
either<br>
the Hebrew or gregorian calendar; by either calendar day of<br>
month or<br>
nth day of week of month; and provides a simple method of<br>
specifying<br>
how/whether to advance/postpone a custom day should it<br>
occur just<br>
before, on, or just after the Shabbat.<br>
<br>
JULIAN DAY<br>
The julian day system is not directly related to the Julian<br>
calendar.<br>
Rather, it was introduced by astronomers for scientific use to<br>
provide<br>
a single system of dates that could be used when working with<br>
different<br>
calendars and to unify different historical chronologies.<br>
Julian day<br>
number (JDN) zero corresponds to January 1, 4713 BCE<br>
Greenwich noon,<br>
according to the "julian proleptic calendar".<br>
<br>
TABULAR OUTPUT<br>
When invoked with option -T ( --table or --tabular ), hdate<br>
outputs the<br>
requested data for any single day in comma-delimited format,<br>
with no<br>
intervening spaces. The only exception is that holidays and<br>
custom_days<br>
are delimited from each other with semi-colons, because there<br>
may be<br>
more than one of those entries for any given day. When<br>
invoked for a<br>
month (no dd supplied) or a year (no dd or dd supplied), data<br>
for sepa‐<br>
rate days are new-line-delimited. The first line of tabular<br>
output is a<br>
header line, describing each field being output, and delimited<br>
in the<br>
same way as the data line(s). Output of the header line can<br>
be sup‐<br>
pressed using option -qqq ( --quiet-descriptions ).<br>
<br>
FILES<br>
CONFIG FILES<br>
The config files and their parent folder will be automatically<br>
created.<br>
Each file includes its own documentation, in-line. Should you<br>
ever wish<br>
to restore a config file to its original text, rename or<br>
delete your<br>
current one; hdate will create a replacement automatically on<br>
its next<br>
invocation. Both hdate and hcal make use of identically<br>
formatted cus‐<br>
tom_days files, so you may freely copy that file from one<br>
config folder<br>
to the other, or use a symbolic link so both programs will<br>
always use<br>
the same custom_days information.<br>
<br>
${XDG_CONFIG_HOME}/hdate/hdaterc<br>
<br>
${XDG_CONFIG_HOME}/hdate/custom_days<br>
<br>
If ${XDG_CONFIG_HOME} is undefined:<br>
<br>
~/.config/hdate/hdaterc<br>
<br>
~/.config/hdate/custom_days<br></div></div>