Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

hebcal

> 编程语言
Open source

A perpetual Jewish Calendar

183 stars0 likes0 views
WebsiteGitHub

About

A perpetual Jewish Calendar

hebcal

A perpetual Jewish Calendar

by Danny Sadinoff (portions by Michael J. Radwin)

Description

Hebcal is a program which prints out the days in the Jewish calendar for a given secular year. Hebcal is fairly flexible in terms of which events in the Jewish calendar it displays. Each of the following can be individualy turned on or off:

  • The Hebrew date
  • Jewish Holidays (including Yom Ha'atzmaut and Yom HaShoah etc.)
  • The weekly Sedrah
  • The day of the week
  • The days of the Omer

Synopsis

usage: hebcal [options] [[ month [ day ]] year | YYYY-MM-DD ]
       hebcal help
       hebcal info
       hebcal cities
       hebcal warranty
       hebcal copying

Hebcal prints out Hebrew calendars one solar year at a time. By specifying month, day, or year, output can be limited to a particular month or date in a particular year.

Note that year is usually a four-digit integer, so 92 is during the Roman period, not the late twentieth century. If the Hebrew dates option (-H) is turned on, this number represents the Jewish calendar year.

month is a number from 1..12, or the name of a Jewish calendar month. day is a number from 1..31.

A single day may also be specified as YYYY-MM-DD (ISO 8601 date format).

For example, the command hebcal 10 1992 will print out the holidays occurring in October of 1992 C.E., while the command hebcal Tish 5752 will print dates of interest in the month of Tishrei in Jewish calendar year 5752.

If no year is specified, hebcal will print to stdout the dates of the Jewish holidays in the current secular year.

For example, hebcal -ho will just print out the days of the omer for the current year.

Options

General options

Option Description
--help Show help text
--version Show version number

Input Options

Option Description
-H, --hebrew-date Use Hebrew date ranges - only needed when e.g. hebcal -H 5373
-I, --infile INFILE Get non-yahrtzeit Hebrew user events from specified file. The format is: mmm dd string, Where mmm is a Hebrew month name.
--no-julian disable Julian calendar for dates before September 14, 1752
-t, --today Only output for today's date
-T, --today-brief Print today's pertinent information, no Gregorian date.
-X, --exit-if-chag Exit silently with non-zero status if today is Shabbat or Chag; exit with 0 status if today is chol.
-Y, --yahrtzeit YAHRTZEIT Get yahrtzeit dates from specified file. The format is: mm dd yyyy string. The first three fields specify a Gregorian date.

Output Options

Option Description
-8 Use UTF-8 Hebrew (alias for --lang=he).
-a, --ashkenazi Use Ashkenazi Hebrew transliterations (alias for --lang=ashkenazi).
--chag-only Output only Chag and Erev Chag events (when melakha/labor is prohibited)
-d, --add-hebrew-dates print the Hebrew date for the entire date range.
-D, --add-hebrew-dates-for-events print the Hebrew date for dates with some events
-e, --euro-dates Output "European" dates -- DD.MM.YYYY format.
-E, --24hour Output 24-hour times (e.g. 18:37 instead of 6:37).
-g, --iso-8601 Output ISO 8601 dates -- YYYY-MM-DD (this overrides -y)
-h, --no-holidays Suppress default holidays.
-i, --israeli Use Israeli holiday and sedra schedule.
--lang LANG Use LANG titles (one of en, ashkenazi, ashkenazi_komatz, ashkenazi_litvish, ashkenazi_poylish, ashkenazi_romanian, ashkenazi_standard, de, es, fi, fr, he, he-x-NoNikud, hu, nl, pl, pt, ro, ru, uk, yi)
--mevarchim Include Shabbat Mevarchim HaChodesh.
-M, --molad Print the molad on shabbat mevorchim.
--no-mf Suppress minor fast days.
--no-modern Suppress modern Israeli holidays.
--no-special Suppress Special Shabbatot.
-o, --omer Add days of the omer.
-O, --sunrise-and-sunset Output sunrise and sunset times every day.
-r, --tabs Tab delineated format.
-s, --sedrot Add weekly sedrot on Saturday.
-S, --daily-sedra Print sedrah of the week on all calendar days.
--verbose Verbose mode, currently used only for --exit-if-chag
-w, --weekday Add day of the week.
-W, --abbrev Weekly view. Omer, dafyomi, and non-date-specific zemanim are shown once a week, on the day which corresponds to the first day in the range.
-x, --no-rosh-chodesh Suppress Rosh Chodesh.
-y, --year-abbrev Print only last two digits of year.
--years N Generate events for N years (default 1)
--ykk Include Yom Kippur Katan, minor day of atonement occurring monthly on the day preceding each Rosh Chodesh

Learning Schedules

Hebcal can interleave a variety of daily and weekly Torah and Talmud learning schedules into the calendar. The schedules below have dedicated options; in addition, any schedule may be requested by name with the repeatable --daily-learning option, e.g. hebcal --daily-learning rambam1 --daily-learning 929.

Option Description
-F, --daf-yomi Output the Daf Yomi (Bavli) for the entire date range.
--mishna-yomi Output the Mishna Yomi for the entire date range.
--nach-yomi Output the Nach Yomi for the entire date range.
--yerushalmi Output the Yerushalmi Yomi for the entire date range.
--schottenstein Use the Schottenstein edition of Yerushalmi Yomi (implies --yerushalmi; default is the Vilna edition).
--daily-learning NAME Output the named learning schedule for the entire date range. May be repeated. See the table below for valid names.

The following schedule names are accepted by --daily-learning:

Name Description
dafYomi Daf Yomi, a daily page of the Babylonian Talmud (Bavli).
mishnaYomi Mishna Yomi, two Mishnayot per day (~6-year cycle).
nachYomi Nach Yomi, a daily chapter of Nevi'im (Prophets) and Ketuvim (Writings).
yerushalmi-vilna Yerushalmi Yomi, a daily page of the Jerusalem Talmud (Vilna edition).
yerushalmi-schottenstein Yerushalmi Yomi, a daily page of the Jerusalem Talmud (Schottenstein edition).
929 929 (Tanakh B'Yachad), a daily chapter of the Hebrew Bible, Sun–Thu, covering all 929 chapters in ~3.5 years.
rambam1 Daily Rambam (Mishneh Torah), one chapter a day.
rambam3 Daily Rambam (Mishneh Torah), three chapters a day.
dafWeekly Daf-a-Week, the same page of the Babylonian Talmud studied for an entire week (~52-year cycle).
dafWeeklySunday Daf-a-Week, shown only on Sundays.
perekYomi Perek Yomi, one chapter of the Mishnah per day (~17-month cycle).
psalms Daily Psalms (Tehillim) in the traditional 30-day cycle, completing the book of Psalms each Hebrew month.
pirkeiAvotSummer Pirkei Avot ("Ethics of the Fathers"), one chapter on each Shabbat of the summer between Pesach and Rosh Hashana.
tanakhYomi Tanakh Yomi, completing the Tanakh annually by the Masoretic division into sedarim (skips Shabbat and major festivals).

Options related to candle-lighting times

Option Description
-b, --candle-mins mins Set candle-lighting to occur this many minutes before sundown. Default 18 if unspecified (default 40 for Jerusalem, 30 for Haifa, 30 for Zichron Ya'akov).
-c, --candlelighting Print candlelighting times.
-C, --city city Set latitude, longitude, and timezone according to specified city. This option implies the -c option.
--geo LATITUDE,LONGITUDE Set location for solar calculations to decimal values LATITUDE and LONGITUDE. Negative longitudes are WEST of the Prime Meridian.
-G, --havdalah-deg DEGREES Set Havdalah to occur this many degrees below the horizon
-l, --latitude XX,YY Set the latitude for solar calculations to XX degrees and YY minutes. Negative values are south. Deprecated: use --geo instead.
-L, --longitude XX,YY Set the longitude for solar calculations to XX degrees and YY minutes. Negative values are EAST. The -l and -L switches must both be used, or not at all. These switches override the -C (localize to city) switch. Deprecated: use --geo instead.
-m, --havdalah-mins MINS Set havdalah to occur this many minutes after sundown
-z, --timezone timezone Use specified timezone, overriding the -C (localize to city) switch. For correct DST rules, use a full timezone name (such as America/New_York) instead of a timezone abbreviation (such as EST)
-Z, --zmanim Add zemanim (Alot HaShachar; Misheyakir; Kriat Shema, sof zeman; Tefilah, sof zeman; Chatzot hayom; Mincha Gedolah; Mincha Ketanah; Plag HaMincha; Tzait HaKochavim)

Candle-lighting and fast start/end times

Hebcal’s candlelighting times are only approximations. If you ever have any doubts about its times, consult your local halachic authority. If you enter geographic coordinates above the arctic circle or antarctic circle, the times are guaranteed to be wrong.

In addition to candle-lighting on Erev Shabbat and Chag, the -c switch also generates Havdalah and fast start/end times.

By default, candle-lighting times are 18 minutes before sunset (see -b option above for exceptions).

Chanukah candle-lighting times are at bein hashmashos (13.5 minutes before a solar depression of 7.083 degrees) on weekdays. Chanukah candles are lit just before Shabbat candles on Friday, and immediately after Havdalah on Saturday night.

Havdalah time defaults to 72 minutes after sunset (Rabbeinu Tam). Adjust with the -m (minutes) option or with -G (havdalah degrees below horizon).

Minor fasts begin in the morning at alot haShachar (solar depression 16.1 degrees) and conclude at tzeit for 3 medium sized stars (solar depression 7.083 degrees). Major fasts (Yom Kippur and Tish'a B'Av) begin just before sunset (at regular candle-lighting time) and conclude at Havdalah time.

Hebcal contains a small database of cities with their associated geographic information and time-zone information. Run hebcal cities to print a list of cities supported by the -C city flag.

If your city is NOT on the list, then in order to customize hebcal to your city, you will need to pass it the latitude, longitude, and timezone (see the manual).

Suppose you live in Oshkosh, Wisconsin. Your latitude is 44.0181, and your longitude is -88.6353. You are in timezone America/Chicago. We'll round the geographic coordinates to the nearest minute.

In order to get candlelighting times for the current year, you would type

hebcal -ch --geo 44.0181,-88.6353 -z America/Chicago

The geographic and time information necessary to calculate sundown times can come to hebcal any of three ways:

  1. The default: the system manager sets a default city ("New York") when the program is compiled.
  2. Hebcal looks in the environment variable HEBCAL_CITY for the name of a city in hebcal’s database, and if it finds one, hebcal will make that the new default city.
  3. 1 and 2 may be overridden by command line arguments, including those specified in the HEBCAL_OPTS environment variable. The most natural way to do this is to use the −C city command. This will localize hebcal to city. A list of the cities hebcal knows about can be obtained by typing hebcal cities at the command prompt. If the city you want isn’t on that list, you can directly control hebcal’s geographic information with the --geo (or −l and −L) and −z switches.

For a status report on customizations, type hebcal info at the command prompt.

Note on Julian calendar

In 1582, Pope Gregory XIII introduced a correction into the calendar and advanced it by 10 days. The older calendar became known as the Julian calendar and the new one, post correction, as the Gregorian calendar. The Pope's change was adopted quickly by the Catholic world, but the rest of Christendom took much longer to swtich over and different countries did so at different t

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gocalendarhebcalhebrew-calendarhebrew-date

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言