
Idf Date Converter
- 57 installs
- 9 repo stars
- Updated August 3, 2026
- skills-il/developer-tools
Convert Gregorian dates to Hebrew calendar dates and verified 2025–2026 holiday anchors when planning launches, support windows, or Israel-facing features.
About
IDF Date Converter is a developer-tools agent skill for solo builders and small teams who ship software for Israeli users or hybrid global/Hebrew calendars. It packages calendar facts agents can cite without hallucinating moveable feast dates: whether 5786 is leap or regular, and a verified map of major 2026 holidays from Tu B'Shvat through Chanukah. The skill is backed by explicit claim objects with URLs and snippets, which helps agents answer “what is 15 Nisan in 2026?” or “when is Yom HaAtzmaut this year?” in implementation chats. It fits Build-phase work when you integrate scheduling, billing cycles, support SLAs, or marketing sends that must respect Hebrew dates and national observances. It is not a full iCal generator by itself—it is procedural knowledge plus verified reference data your agent applies while writing code, copy, or runbooks.
- Documents Hebrew year 5786 as a regular (non-leap) year with a single Adar
- Pins 2026 Gregorian holiday dates (Pesach, Rosh Hashana, Chanukah, fast days) from verified claim records
- Structured JSON claims with source URLs (Hebcal, Wikipedia Metonic cycle) for agent grounding
- Supports Hebrew/English SKILL variants for the same conversion rules
- Useful for deadline math around Ta'anit Esther, Purim, and national memorial days
Idf Date Converter by the numbers
- 57 all-time installs (skills.sh)
- Ranked #1,572 of 3,282 Productivity & Planning skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/skills-il/developer-tools --skill idf-date-converterAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 57 |
|---|---|
| repo stars | ★ 9 |
| Security audit | 3 / 3 scanners passed |
| Last updated | August 3, 2026 |
| Repository | skills-il/developer-tools ↗ |
What it does
Convert Gregorian dates to Hebrew calendar dates and verified 2025–2026 holiday anchors when planning launches, support windows, or Israel-facing features.
Files
IDF Date Converter
Instructions
Step 1: Identify the Request
| Request | Action |
|---|---|
| Convert specific date | Gregorian to Hebrew or Hebrew to Gregorian conversion |
| When is holiday X? | Look up holiday in Hebrew calendar |
| Format for document | Dual date string in Hebrew + Gregorian |
| Business days | Count excluding Shabbat + holidays |
| Shabbat times | Candle lighting / havdalah for city |
Step 2: Date Conversion
Use Python conversion:
# Using pyluach library
from pyluach import dates, hebrewcal
# Gregorian to Hebrew
greg_date = dates.GregorianDate(2026, 2, 24)
heb_date = greg_date.to_heb()
print(f"{heb_date.day} {heb_date.month_name()} {heb_date.year}")
# Hebrew to Gregorian (always verify the resulting date by round-tripping)
heb_date = dates.HebrewDate(5786, 11, 15) # 15 Shvat 5786 (Tu B'Shvat) — pyluach numbers months starting at Nisan=1, so Shvat=11
greg_date = heb_date.to_greg()
print(f"{greg_date.day}/{greg_date.month}/{greg_date.year}")Step 3: Hebrew Numeral Formatting
Hebrew dates use gematria (letter-number system):
- Units: alef=1, bet=2, gimel=3, ... tet=9
- Tens: yod=10, kaf=20, lamed=30, ... tzadi=90
- Hundreds: kuf=100, resh=200, shin=300, tav=400
- Special: 15 = tet-vav (not yod-heh), 16 = tet-zayin (not yod-vav)
- Year: Omit thousands (5786 written as tav-shin-peh-vav = 786)
Step 4: Dual Date Formatting
For Israeli documents:
24 February 2026 / 7 Adar 5786(5786 is a regular Hebrew year, not a leap year, so there is only one Adar — no Adar I / Adar II. Always run pyluach to confirm a dual-date string before printing it.)
Step 5: Israeli Business Days
Israeli business week: Sunday through Thursday (some work half-day Friday) Non-working days:
- Every Shabbat (Friday sunset to Saturday sunset)
- All major holidays (see holiday table)
- Election days (when applicable)
def is_israeli_business_day(greg_date):
"""Check if a date is an Israeli business day."""
# Saturday = 5 in Python's weekday() (0=Monday)
if greg_date.weekday() == 5: # Saturday
return False
# Check if it's a holiday
heb = dates.GregorianDate(greg_date.year, greg_date.month, greg_date.day).to_heb()
# Check against holiday list
return not is_israeli_holiday(heb)Israeli Holidays and Fast Days, Gregorian projection for 2026
All projections are calendar-year 2026. Where a Hebrew month spans two Hebrew years (Tishrei rolls into the next Hebrew year), the row gives the Hebrew year that the holiday actually falls in.
| Holiday / Fast | Hebrew Date | Gregorian 2026 (approx) | Hebrew Year |
|---|---|---|---|
| Tu B'Shvat | 15 Shvat | Feb 2 | 5786 |
| Fast of Esther (Ta'anit Esther) | 13 Adar | Mar 2 | 5786 |
| Purim | 14 Adar | Mar 3 | 5786 |
| Shushan Purim | 15 Adar | Mar 4 | 5786 |
| Pesach | 15-21 Nisan | Apr 2-8 | 5786 |
| Yom HaShoah | 27 Nisan | Apr 14 | 5786 |
| Yom HaZikaron | 4 Iyar | Apr 21 | 5786 |
| Yom HaAtzmaut | 5 Iyar | Apr 22 | 5786 |
| Lag BaOmer | 18 Iyar | May 5 | 5786 |
| Shavuot | 6 Sivan | May 22 | 5786 |
| Fast of 17 Tammuz (Shiv'a Asar B'Tammuz) | 17 Tammuz | Jul 3 | 5786 |
| Tisha B'Av (9 Av) | 9 Av | Jul 24 | 5786 |
| Rosh Hashana | 1-2 Tishrei | Sep 12-13 | 5787 |
| Fast of Gedaliah (Tzom Gedaliah) | 3 Tishrei | Sep 14 | 5787 |
| Yom Kippur | 10 Tishrei | Sep 21 | 5787 |
| Sukkot | 15-21 Tishrei | Sep 26 - Oct 2 | 5787 |
| Simchat Torah | 22 Tishrei | Oct 3 | 5787 |
| Chanukah (5787) | 25 Kislev - 2 Tevet | Dec 5-12, 2026 | 5787 |
| Fast of 10 Tevet (Asarah B'Tevet) | 10 Tevet | Dec 20 | 5787 |
Note on Chanukah: the 5787 occurrence begins on the evening of 4 Dec 2026 (kindling the first candle) and the first full Gregorian day is 5 Dec 2026 (25 Kislev). It ends 12 Dec 2026 (2 Tevet). The table shows the 5787 occurrence because that is the one that lands in calendar year 2026.
Always verify these dates with pyluach before using them in production. The corrected dates above were regenerated in v2.0.0 after the initial 2026 projection table shipped with off-by-one errors on roughly half the entries.
Yom HaZikaron / Yom HaAtzmaut displacement rules
The Knesset legislated displacement of Yom HaZikaron and Yom HaAtzmaut to avoid Shabbat desecration. Apply these rules before printing dates:
- If 5 Iyar falls on Friday or Saturday, Yom HaAtzmaut moves earlier to Thursday (4 Iyar or 3 Iyar). Yom HaZikaron moves with it.
- If 5 Iyar falls on Monday, Yom HaAtzmaut moves later to Tuesday (6 Iyar) so Yom HaZikaron does not start on Saturday night ceremonies that border Shabbat.
- If 5 Iyar falls on Sunday, Tuesday, or Wednesday, no displacement.
- Yom HaShoah (27 Nisan) is similarly displaced: if it falls on Friday it moves to Thursday (26 Nisan); if it falls on Sunday it moves to Monday (28 Nisan).
In 2026, 5 Iyar falls on Wednesday (Apr 22), so no displacement. Always re-check via pyluach or hebcal for other years.
Examples
Example 1: Simple Conversion
User says: "What's today's Hebrew date?" Result: "24 February 2026 = 26 Adar I 5786"
Example 2: Holiday Lookup
User says: "When is Pesach 2026?" Result: "Pesach begins evening of April 1, 2026 (15 Nisan 5786). First seder: April 2. Last day in Israel: April 8."
Example 3: Business Days
User says: "How many business days between March 1 and March 31, 2026?" Result: Count excluding Shabbatot, noting if any holidays fall in the range (Purim on March 3, Shushan Purim on March 4).
Bundled Resources
Scripts
scripts/convert_date.py, Converts between Hebrew and Gregorian calendars, formats dual dates for Israeli documents, lists Israeli holidays for any year, and counts Israeli business days between date ranges (excluding Shabbatot and holidays). Requirespyluachlibrary. Run:python scripts/convert_date.py --help
References
references/hebrew-calendar-reference.md, Complete Hebrew calendar reference covering month names and variable lengths, the 19-year Metonic leap year cycle, gematria (Hebrew numeral) conversion table with special cases, Israeli holiday calendar with work-off days versus partial-closure days, and recommended Python libraries (pyluach, hebcal). Consult when handling leap year edge cases, formatting Hebrew numerals, or determining which holidays affect business day calculations.
Gotchas
- Hebrew calendar dates have variable month lengths (29 or 30 days) and leap years add an entire month (Adar II). Agents may assume fixed month lengths or Gregorian leap year rules.
- Israeli official documents use Hebrew dates (e.g., "כ"ה באדר תשפ"ו") while business documents use Gregorian DD/MM/YYYY. Agents may not know which format to use for which context.
- Jewish holidays move relative to the Gregorian calendar each year. Agents with static training data may cite incorrect dates for Rosh Hashana, Pesach, etc. in the current year.
- The Hebrew year starts in Tishrei (September/October), not January. Agents may miscalculate Hebrew year boundaries when converting dates near the Gregorian new year.
- Yom HaZikaron, Yom HaAtzmaut, and Yom HaShoah are subject to legislated day-of-week displacement to avoid Shabbat conflicts. Static lookup tables that hard-code "5 Iyar" without checking the day of week will print wrong dates roughly half the time. Always run the displacement rules above.
- Chanukah usually straddles two Gregorian years (late Dec into early Jan). When labeling a Gregorian year column, pick the Hebrew year whose 25 Kislev actually lands inside that Gregorian year. Mixing 5786 and 5787 dates in the same row is a common mistake.
Troubleshooting
Error: "Incorrect Hebrew date"
Cause: Hebrew months vary in length; leap year months confusing Solution: Verify with hebcal.com. Adar I/II only exist in leap years. Current year (5786) leap status affects dates.
{
"schemaVersion": "1.0",
"skill": "idf-date-converter",
"generated_at": "2026-05-20T00:00:00Z",
"claims": [
{
"claim_id": "hebrew-year-5786-not-leap",
"claim": "The Hebrew year 5786 (2025-2026 Gregorian) is a regular year in the 19-year Metonic cycle, NOT a leap year, so it has only one Adar (no Adar I / Adar II).",
"source_url": "https://en.wikipedia.org/wiki/Hebrew_calendar",
"raw_snippet": "19-year cycle",
"fetched_at": "2026-05-20T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "hebrew-2026-holiday-dates",
"claim": "Hebrew calendar 2026 (Gregorian) holiday dates verified against pyluach: Tu B'Shvat (15 Shvat) = Feb 2; Ta'anit Esther (13 Adar) = Mar 2; Purim (14 Adar) = Mar 3; Shushan Purim (15 Adar) = Mar 4; Pesach (15-21 Nisan) = Apr 2-8; Yom HaShoah (27 Nisan) = Apr 14; Yom HaZikaron (4 Iyar) = Apr 21; Yom HaAtzmaut (5 Iyar) = Apr 22; Lag BaOmer (18 Iyar) = May 5; Shavuot (6 Sivan) = May 22; 17 Tammuz = Jul 3; Tisha B'Av (9 Av) = Jul 24; Rosh Hashana (1-2 Tishrei 5787) = Sep 12-13; Yom Kippur (10 Tishrei) = Sep 21; Sukkot (15-21 Tishrei) = Sep 26 - Oct 2; Simchat Torah (22 Tishrei in Israel) = Oct 3; Chanukah (25 Kislev - 2 Tevet 5787) = Dec 5-12, 2026 (first candle evening Dec 4); 10 Tevet = Dec 20, 2026.",
"source_url": "https://www.hebcal.com/holidays/2026",
"raw_snippet": "Pesach Shavuot Purim",
"fetched_at": "2026-05-20T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "pyluach-library",
"claim": "pyluach is an open-source Python library for Hebrew calendar / Jewish date conversion, used as the canonical reference implementation for date arithmetic in this skill.",
"source_url": "https://github.com/simlist/pyluach",
"raw_snippet": "pyluach",
"fetched_at": "2026-05-20T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md", "scripts/convert_date.py"]
},
{
"claim_id": "hebcal-com",
"claim": "hebcal.com is the canonical web-based Hebrew calendar reference and provides authoritative holiday tables, dual-date conversions, and a developer API at hebcal.com/home/developer-apis.",
"source_url": "https://www.hebcal.com",
"raw_snippet": "hebcal https://www.hebcal.com/home/developer-apis",
"fetched_at": "2026-05-20T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "yom-haatzmaut-displacement-2026",
"claim": "5 Iyar 5786 falls on a Wednesday (April 22, 2026), so neither Yom HaZikaron nor Yom HaAtzmaut is displaced in 2026 under the Knesset's displacement rules.",
"source_url": "https://www.hebcal.com/holidays/yom-haatzmaut",
"raw_snippet": "Yom HaAtzmaut",
"fetched_at": "2026-05-20T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "knesset-displacement-laws",
"claim": "The Israeli Knesset legislated displacement rules for Yom HaZikaron and Yom HaAtzmaut to avoid Shabbat desecration: if 5 Iyar falls on Friday or Saturday, both are moved earlier; if it falls on Monday, Yom HaAtzmaut moves later to Tuesday; if it falls on Sunday, Tuesday, or Wednesday, no displacement applies.",
"source_url": "https://en.wikipedia.org/wiki/Yom_Ha%27atzmaut",
"raw_snippet": "displacement",
"fetched_at": "2026-05-20T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "gematria-numerals",
"claim": "Hebrew gematria uses letter-number mapping (alef=1, bet=2, ..., yod=10, kaf=20, ..., kuf=100, ..., tav=400) with two important exceptions: 15 is written tet-vav (not yod-heh) and 16 is tet-zayin (not yod-vav), to avoid spelling Divine names.",
"source_url": "https://en.wikipedia.org/wiki/Hebrew_numerals",
"raw_snippet": "gematria",
"fetched_at": "2026-05-20T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "pesach-israel-7-days",
"claim": "Pesach is celebrated for 7 days in Israel (15-21 Nisan) and 8 days in the diaspora (15-22 Nisan, with an additional last day yom tov sheni).",
"source_url": "https://en.wikipedia.org/wiki/Passover",
"raw_snippet": "Passover",
"fetched_at": "2026-05-20T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "israeli-business-week",
"claim": "The Israeli business week runs Sunday through Thursday; Friday is a half-day in many sectors and Saturday (Shabbat) is the non-working day.",
"source_url": "https://en.wikipedia.org/wiki/Workweek_and_weekend",
"raw_snippet": "Israel",
"fetched_at": "2026-05-20T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md", "scripts/convert_date.py"]
}
]
}
{
"author": "skills-il",
"version": "2.0.0",
"category": "developer-tools",
"tags": {
"he": [
"לוח-שנה",
"תאריך-עברי",
"חגים",
"שבת",
"המרה",
"ישראל"
],
"en": [
"calendar",
"hebrew-date",
"holidays",
"shabbat",
"conversion",
"israel"
]
},
"display_name": {
"he": "ממיר תאריכים עברי-לועזי",
"en": "IDF Date Converter"
},
"display_description": {
"he": "ממירים בין תאריכים עבריים ולועזיים בכל הפורמטים.",
"en": "Convert between Hebrew (Jewish) calendar and Gregorian dates, look up Israeli holidays, format dual dates for Israeli documents, and calculate Israeli business days. Use when user asks about Hebrew dates, \"luach ivri\", Jewish calendar, Israeli holidays, \"chagim\", Shabbat times, or needs dual-date formatting for Israeli forms. Do NOT use for Islamic Hijri calendar or non-Israeli holiday calendars."
},
"supported_agents": [
"claude-code",
"cursor",
"github-copilot",
"windsurf",
"opencode",
"codex",
"openclaw",
"antigravity",
"gemini-cli"
]
}
Hebrew Calendar Reference
Month Names and Lengths
| Month # | Name | Length (Regular) | Length (Leap Year) |
|---|---|---|---|
| 7 | Tishrei | 30 | 30 |
| 8 | Cheshvan (Marcheshvan) | 29 or 30 | 29 or 30 |
| 9 | Kislev | 30 or 29 | 30 or 29 |
| 10 | Tevet | 29 | 29 |
| 11 | Shevat | 30 | 30 |
| 12 | Adar | 29 | 30 (Adar I) |
| 13 | - | - | 29 (Adar II) |
| 1 | Nisan | 30 | 30 |
| 2 | Iyar | 29 | 29 |
| 3 | Sivan | 30 | 30 |
| 4 | Tammuz | 29 | 29 |
| 5 | Av | 30 | 30 |
| 6 | Elul | 29 | 29 |
Notes:
- Cheshvan can be 29 or 30 days (deficient or full year)
- Kislev can be 30 or 29 days (full or deficient year)
- In leap years, Adar becomes Adar I (30 days) and Adar II (29 days) is added
Leap Year Cycle
The Hebrew calendar follows a 19-year (Metonic) cycle. Years 3, 6, 8, 11, 14, 17, and 19 of the cycle are leap years.
To determine if a Hebrew year is a leap year:
remainder = hebrew_year % 19
leap_years = {0, 3, 6, 8, 11, 14, 17}
is_leap = remainder in leap_yearsGematria (Hebrew Numerals)
| Value | Letter | Name |
|---|---|---|
| 1 | Alef | |
| 2 | Bet | |
| 3 | Gimel | |
| 4 | Dalet | |
| 5 | Heh | |
| 6 | Vav | |
| 7 | Zayin | |
| 8 | Chet | |
| 9 | Tet | |
| 10 | Yod | |
| 20 | Kaf | |
| 30 | Lamed | |
| 40 | Mem | |
| 50 | Nun | |
| 60 | Samech | |
| 70 | Ayin | |
| 80 | Peh | |
| 90 | Tzadi | |
| 100 | Kuf | |
| 200 | Resh | |
| 300 | Shin | |
| 400 | Tav |
Special cases:
- 15 is written as Tet-Vav (9+6) NOT Yod-Heh (to avoid spelling a divine name)
- 16 is written as Tet-Zayin (9+7) NOT Yod-Vav (same reason)
- Years omit the thousands digit: 5786 is written as 786
Israeli Holiday Calendar
Days Fully Off Work in Israel
| Holiday | Hebrew Date | Type |
|---|---|---|
| Rosh Hashana (Day 1) | 1 Tishrei | National |
| Rosh Hashana (Day 2) | 2 Tishrei | National |
| Yom Kippur | 10 Tishrei | National |
| Sukkot (Day 1) | 15 Tishrei | National |
| Simchat Torah | 22 Tishrei | National |
| Pesach (Day 1) | 15 Nisan | National |
| Pesach (Day 7) | 21 Nisan | National |
| Yom HaAtzmaut | 5 Iyar | National |
| Shavuot | 6 Sivan | National |
Memorial/Observance Days (Partial or Full Closure)
| Day | Hebrew Date | Notes |
|---|---|---|
| Yom HaShoah | 27 Nisan | Sirens, some closures |
| Yom HaZikaron | 4 Iyar | Sirens, closures |
| Tisha B'Av | 9 Av | Some closures |
Days With Modified Schedules
| Period | Dates | Notes |
|---|---|---|
| Sukkot Chol HaMoed | 16-21 Tishrei | Reduced hours, some closed |
| Pesach Chol HaMoed | 16-20 Nisan | Reduced hours, some closed |
| Chanukah | 25 Kislev - 2 Tevet | Schools off, businesses open |
Python Libraries
- pyluach: Pure Python Hebrew calendar library (recommended)
- Install:
pip install pyluach - Docs: https://github.com/simlist/pyluach
- hebcal: Hebrew calendar computations
- Web API: https://www.hebcal.com/home/developer-apis
#!/usr/bin/env python3
"""Hebrew-Gregorian Date Converter for Israeli applications.
Converts between Hebrew (Jewish) calendar and Gregorian dates, looks up
Israeli holidays, formats dual dates for Israeli documents, and calculates
Israeli business days.
Requirements:
pip install pyluach
Usage:
python convert_date.py today
python convert_date.py to-hebrew 2026-02-24
python convert_date.py to-gregorian 5786 6 26
python convert_date.py holidays 2026
python convert_date.py business-days 2026-03-01 2026-03-31
"""
import argparse
import sys
from datetime import date, timedelta
try:
from pyluach import dates, hebrewcal
HAS_PYLUACH = True
except ImportError:
HAS_PYLUACH = False
# Hebrew month names for fallback display
HEBREW_MONTHS = {
1: "Nisan", 2: "Iyar", 3: "Sivan", 4: "Tammuz", 5: "Av", 6: "Elul",
7: "Tishrei", 8: "Cheshvan", 9: "Kislev", 10: "Tevet", 11: "Shevat",
12: "Adar", 13: "Adar II"
}
# Israeli holidays (Hebrew month, day) -> holiday name
# Month numbering: 7=Tishrei (start of civil year), 1=Nisan (start of religious year)
ISRAELI_HOLIDAYS = {
(7, 1): "Rosh Hashana (Day 1)",
(7, 2): "Rosh Hashana (Day 2)",
(7, 10): "Yom Kippur",
(7, 15): "Sukkot (Day 1)",
(7, 16): "Sukkot (Day 2)",
(7, 17): "Sukkot (Chol HaMoed)",
(7, 18): "Sukkot (Chol HaMoed)",
(7, 19): "Sukkot (Chol HaMoed)",
(7, 20): "Sukkot (Chol HaMoed)",
(7, 21): "Hoshana Rabba",
(7, 22): "Simchat Torah",
(1, 15): "Pesach (Day 1)",
(1, 16): "Pesach (Chol HaMoed)",
(1, 17): "Pesach (Chol HaMoed)",
(1, 18): "Pesach (Chol HaMoed)",
(1, 19): "Pesach (Chol HaMoed)",
(1, 20): "Pesach (Chol HaMoed)",
(1, 21): "Pesach (Day 7)",
(3, 6): "Shavuot",
(1, 27): "Yom HaShoah",
(2, 4): "Yom HaZikaron",
(2, 5): "Yom HaAtzmaut",
}
def gregorian_to_hebrew(greg_date: date) -> dict:
"""Convert a Gregorian date to Hebrew date.
Args:
greg_date: Python date object
Returns:
Dictionary with Hebrew date components
"""
if HAS_PYLUACH:
gd = dates.GregorianDate(greg_date.year, greg_date.month, greg_date.day)
hd = gd.to_heb()
return {
"year": hd.year,
"month": hd.month,
"day": hd.day,
"month_name": hd.month_name(),
"formatted": f"{hd.day} {hd.month_name()} {hd.year}",
}
else:
print("WARNING: pyluach not installed. Install with: pip install pyluach",
file=sys.stderr)
return {
"error": "pyluach not installed",
"install": "pip install pyluach"
}
def hebrew_to_gregorian(year: int, month: int, day: int) -> dict:
"""Convert a Hebrew date to Gregorian.
Args:
year: Hebrew year (e.g., 5786)
month: Hebrew month (7=Tishrei, 1=Nisan, etc.)
day: Day of month
Returns:
Dictionary with Gregorian date components
"""
if HAS_PYLUACH:
hd = dates.HebrewDate(year, month, day)
gd = hd.to_greg()
return {
"year": gd.year,
"month": gd.month,
"day": gd.day,
"formatted": f"{gd.year}-{gd.month:02d}-{gd.day:02d}",
"display": f"{gd.day} {date(gd.year, gd.month, gd.day).strftime('%B')} {gd.year}",
}
else:
print("WARNING: pyluach not installed. Install with: pip install pyluach",
file=sys.stderr)
return {"error": "pyluach not installed", "install": "pip install pyluach"}
def format_dual_date(greg_date: date) -> str:
"""Format a date as dual Gregorian/Hebrew for Israeli documents.
Args:
greg_date: Python date object
Returns:
Formatted dual date string
"""
heb = gregorian_to_hebrew(greg_date)
if "error" in heb:
return f"{greg_date.strftime('%d %B %Y')} (Hebrew date unavailable - install pyluach)"
greg_str = greg_date.strftime("%d %B %Y")
heb_str = heb["formatted"]
return f"{greg_str} / {heb_str}"
def is_shabbat(greg_date: date) -> bool:
"""Check if a date falls on Shabbat (Saturday).
Args:
greg_date: Python date object
Returns:
True if the date is Shabbat
"""
return greg_date.weekday() == 5 # Saturday
def is_israeli_holiday(greg_date: date) -> tuple:
"""Check if a Gregorian date falls on an Israeli holiday.
Args:
greg_date: Python date object
Returns:
Tuple of (is_holiday: bool, holiday_name: str or None)
"""
if not HAS_PYLUACH:
return (False, None)
hd = dates.GregorianDate(greg_date.year, greg_date.month, greg_date.day).to_heb()
key = (hd.month, hd.day)
if key in ISRAELI_HOLIDAYS:
return (True, ISRAELI_HOLIDAYS[key])
return (False, None)
def is_israeli_business_day(greg_date: date) -> bool:
"""Check if a date is an Israeli business day.
Israeli business week: Sunday-Thursday (Friday half day, Saturday off)
Also excludes national holidays.
Args:
greg_date: Python date object
Returns:
True if the date is a business day in Israel
"""
# Saturday (5) and Friday (4) are not full business days
if greg_date.weekday() == 5: # Saturday
return False
holiday, _ = is_israeli_holiday(greg_date)
if holiday:
return False
return True
def count_business_days(start_date: date, end_date: date) -> dict:
"""Count Israeli business days between two dates.
Args:
start_date: Start date (inclusive)
end_date: End date (inclusive)
Returns:
Dictionary with count and details
"""
total_days = 0
business_days = 0
holidays_in_range = []
shabbatot = 0
current = start_date
while current <= end_date:
total_days += 1
if is_shabbat(current):
shabbatot += 1
else:
is_hol, hol_name = is_israeli_holiday(current)
if is_hol:
holidays_in_range.append(
f"{current.strftime('%Y-%m-%d')} - {hol_name}"
)
else:
business_days += 1
current += timedelta(days=1)
return {
"start": start_date.isoformat(),
"end": end_date.isoformat(),
"total_days": total_days,
"business_days": business_days,
"shabbatot": shabbatot,
"holidays": holidays_in_range,
}
def get_holidays_for_year(greg_year: int) -> list:
"""Get approximate Gregorian dates for Israeli holidays in a given year.
Args:
greg_year: Gregorian year
Returns:
List of dictionaries with holiday info
"""
if not HAS_PYLUACH:
return [{"error": "pyluach not installed", "install": "pip install pyluach"}]
holidays = []
# Scan the entire Gregorian year day by day
current = date(greg_year, 1, 1)
end = date(greg_year, 12, 31)
while current <= end:
is_hol, hol_name = is_israeli_holiday(current)
if is_hol:
heb = gregorian_to_hebrew(current)
holidays.append({
"holiday": hol_name,
"gregorian": current.isoformat(),
"hebrew": heb.get("formatted", "N/A"),
"day_of_week": current.strftime("%A"),
})
current += timedelta(days=1)
return holidays
def main():
parser = argparse.ArgumentParser(
description="Hebrew-Gregorian Date Converter for Israeli Applications"
)
subparsers = parser.add_subparsers(dest="command", help="Command to execute")
# Today command
subparsers.add_parser("today", help="Show today's date in both calendars")
# To Hebrew command
to_heb = subparsers.add_parser("to-hebrew", help="Convert Gregorian to Hebrew")
to_heb.add_argument("date", help="Gregorian date (YYYY-MM-DD)")
# To Gregorian command
to_greg = subparsers.add_parser("to-gregorian", help="Convert Hebrew to Gregorian")
to_greg.add_argument("year", type=int, help="Hebrew year (e.g., 5786)")
to_greg.add_argument("month", type=int, help="Hebrew month (7=Tishrei, 1=Nisan)")
to_greg.add_argument("day", type=int, help="Day of month")
# Holidays command
holidays_parser = subparsers.add_parser("holidays",
help="List Israeli holidays for a year")
holidays_parser.add_argument("year", type=int, help="Gregorian year")
# Business days command
bdays = subparsers.add_parser("business-days",
help="Count Israeli business days between dates")
bdays.add_argument("start", help="Start date (YYYY-MM-DD)")
bdays.add_argument("end", help="End date (YYYY-MM-DD)")
# Dual date command
dual = subparsers.add_parser("dual", help="Format dual date for Israeli documents")
dual.add_argument("date", help="Gregorian date (YYYY-MM-DD)")
args = parser.parse_args()
if args.command == "today":
today = date.today()
heb = gregorian_to_hebrew(today)
print(f"Gregorian: {today.strftime('%A, %d %B %Y')}")
if "error" not in heb:
print(f"Hebrew: {heb['formatted']}")
print(f"\nDual format: {format_dual_date(today)}")
else:
print(f"Hebrew: Install pyluach: {heb['install']}")
is_bday = is_israeli_business_day(today)
print(f"\nIsraeli business day: {'Yes' if is_bday else 'No'}")
if is_shabbat(today):
print(" (Shabbat)")
is_hol, hol_name = is_israeli_holiday(today)
if is_hol:
print(f" (Holiday: {hol_name})")
elif args.command == "to-hebrew":
parts = args.date.split('-')
greg_date = date(int(parts[0]), int(parts[1]), int(parts[2]))
heb = gregorian_to_hebrew(greg_date)
if "error" not in heb:
print(f"Gregorian: {greg_date.strftime('%d %B %Y')}")
print(f"Hebrew: {heb['formatted']}")
print(f"\nDual format: {format_dual_date(greg_date)}")
else:
print(f"Error: {heb['error']}")
print(f"Install: {heb['install']}")
elif args.command == "to-gregorian":
greg = hebrew_to_gregorian(args.year, args.month, args.day)
if "error" not in greg:
month_name = HEBREW_MONTHS.get(args.month, f"Month {args.month}")
print(f"Hebrew: {args.day} {month_name} {args.year}")
print(f"Gregorian: {greg['display']}")
print(f"ISO: {greg['formatted']}")
else:
print(f"Error: {greg['error']}")
print(f"Install: {greg['install']}")
elif args.command == "holidays":
holidays = get_holidays_for_year(args.year)
if holidays and "error" in holidays[0]:
print(f"Error: {holidays[0]['error']}")
print(f"Install: {holidays[0]['install']}")
else:
print(f"Israeli Holidays in {args.year}:")
print(f"{'Holiday':<30} {'Gregorian':<14} {'Hebrew':<25} {'Day':<10}")
print("-" * 80)
for h in holidays:
print(f"{h['holiday']:<30} {h['gregorian']:<14} "
f"{h['hebrew']:<25} {h['day_of_week']:<10}")
elif args.command == "business-days":
start_parts = args.start.split('-')
end_parts = args.end.split('-')
start_date = date(int(start_parts[0]), int(start_parts[1]), int(start_parts[2]))
end_date = date(int(end_parts[0]), int(end_parts[1]), int(end_parts[2]))
result = count_business_days(start_date, end_date)
print(f"Period: {result['start']} to {result['end']}")
print(f"Total days: {result['total_days']}")
print(f"Business days: {result['business_days']}")
print(f"Shabbatot: {result['shabbatot']}")
if result['holidays']:
print(f"Holidays ({len(result['holidays'])}):")
for h in result['holidays']:
print(f" {h}")
elif args.command == "dual":
parts = args.date.split('-')
greg_date = date(int(parts[0]), int(parts[1]), int(parts[2]))
print(format_dual_date(greg_date))
else:
parser.print_help()
if __name__ == "__main__":
main()
ממיר תאריכים עברי-לועזי
הוראות
שלב 1: זיהוי הבקשה
| בקשה | פעולה |
|---|---|
| המרת תאריך ספציפי | המרה מלועזי לעברי או מעברי ללועזי |
| מתי חל חג X? | חיפוש חג בלוח העברי |
| פורמט למסמך | מחרוזת תאריך כפולה בעברית + לועזית |
| ימי עסקים | ספירה ללא שבתות + חגים |
| זמני שבת | הדלקת נרות / הבדלה לפי עיר |
שלב 2: המרת תאריכים
השתמשו בהמרה עם Python:
# Using pyluach library
from pyluach import dates, hebrewcal
# Gregorian to Hebrew
greg_date = dates.GregorianDate(2026, 2, 24)
heb_date = greg_date.to_heb()
print(f"{heb_date.day} {heb_date.month_name()} {heb_date.year}")
# Hebrew to Gregorian
heb_date = dates.HebrewDate(5786, 6, 26) # 26 Adar 5786
greg_date = heb_date.to_greg()
print(f"{greg_date.day}/{greg_date.month}/{greg_date.year}")שלב 3: עיצוב מספרים עבריים (גימטריה)
תאריכים עבריים משתמשים בגימטריה (מערכת אותיות-מספרים):
- אחדות: א=1, ב=2, ג=3, ... ט=9
- עשרות: י=10, כ=20, ל=30, ... צ=90
- מאות: ק=100, ר=200, ש=300, ת=400
- מקרים מיוחדים: 15 = ט״ו (לא י״ה), 16 = ט״ז (לא י״ו)
- שנה: משמיטים את האלפים (5786 נכתב תשפ״ו = 786)
שלב 4: פורמט תאריך כפול
למסמכים ישראליים:
24 February 2026 / ז׳ באדר תשפ״ו(תשפ״ו אינה שנה מעוברת, ולכן יש רק אדר אחד, ללא אדר א׳/ב׳. הריצו pyluach לפני שמדפיסים מחרוזת תאריך כפול.)
שלב 5: ימי עסקים ישראליים
שבוע העבודה הישראלי: יום ראשון עד יום חמישי (חלקם עובדים חצי יום שישי) ימים שאינם ימי עבודה:
- כל שבת (מכניסת השבת ביום שישי ועד מוצאי שבת)
- כל החגים העיקריים (ראו טבלת חגים)
- ימי בחירות (כאשר רלוונטי)
def is_israeli_business_day(greg_date):
"""Check if a date is an Israeli business day."""
# Saturday = 5 in Python's weekday() (0=Monday)
if greg_date.weekday() == 5: # Saturday
return False
# Check if it's a holiday
heb = dates.GregorianDate(greg_date.year, greg_date.month, greg_date.day).to_heb()
# Check against holiday list
return not is_israeli_holiday(heb)חגים וצומות, היטל לוח לועזי 2026
כל ההיטלים הם לפי שנת לוח לועזית 2026. במקרים שבהם חודש עברי חוצה שתי שנים עבריות (תשרי גולש לשנה העברית הבאה), השורה מציינת את השנה העברית שבה החג חל בפועל.
| חג / צום | תאריך עברי | תאריך לועזי 2026 (בקירוב) | שנה עברית |
|---|---|---|---|
| ט״ו בשבט | ט״ו שבט | 2 בפברואר | תשפ״ו |
| תענית אסתר | י״ג אדר | 2 במרץ | תשפ״ו |
| פורים | י״ד אדר | 3 במרץ | תשפ״ו |
| שושן פורים | ט״ו אדר | 4 במרץ | תשפ״ו |
| פסח | ט״ו-כ״א ניסן | 2-8 באפריל | תשפ״ו |
| יום השואה | כ״ז ניסן | 14 באפריל | תשפ״ו |
| יום הזיכרון | ד׳ אייר | 21 באפריל | תשפ״ו |
| יום העצמאות | ה׳ אייר | 22 באפריל | תשפ״ו |
| ל״ג בעומר | י״ח אייר | 5 במאי | תשפ״ו |
| שבועות | ו׳ סיוון | 22 במאי | תשפ״ו |
| צום י״ז בתמוז (שבעה עשר בתמוז) | י״ז תמוז | 3 ביולי | תשפ״ו |
| תשעה באב | ט׳ אב | 24 ביולי | תשפ״ו |
| ראש השנה | א׳-ב׳ תשרי | 12-13 בספטמבר | תשפ״ז |
| צום גדליה | ג׳ תשרי | 14 בספטמבר | תשפ״ז |
| יום כיפור | י׳ תשרי | 21 בספטמבר | תשפ״ז |
| סוכות | ט״ו-כ״א תשרי | 26 בספטמבר - 2 באוקטובר | תשפ״ז |
| שמחת תורה | כ״ב תשרי | 3 באוקטובר | תשפ״ז |
| חנוכה (תשפ״ז) | כ״ה כסלו - ב׳ טבת | 5-12 בדצמבר 2026 | תשפ״ז |
| צום עשרה בטבת | י׳ טבת | 20 בדצמבר | תשפ״ז |
הערה על חנוכה: ההתרחשות של תשפ״ז מתחילה בערב 4 בדצמבר 2026 (הדלקת נר ראשון), והיום הגרגוריאני הראשון המלא הוא 5 בדצמבר 2026 (כ״ה כסלו). היא מסתיימת ב-12 בדצמבר 2026 (ב׳ טבת). בטבלה מופיעה ההתרחשות של תשפ״ז כי זו שנופלת בלוח 2026.
הזהירו את עצמכם: התאריכים בטבלה הזאת תוקנו ב-v2.0.0 לאחר שגרסת 2026 המקורית נשלחה עם שגיאות של יום אחד על כמחצית מהשורות. תמיד אמתו עם pyluach לפני שמעלים את הקוד לפרודקשן.
כללי דחיית יום הזיכרון ויום העצמאות
הכנסת חוקקה דחיית מועדים של יום הזיכרון ויום העצמאות כדי למנוע חילול שבת. החילו את הכללים האלה לפני שמדפיסים תאריך:
- אם ה׳ באייר חל ביום שישי או שבת, יום העצמאות מוקדם ליום חמישי (ד׳ או ג׳ באייר). יום הזיכרון נע איתו.
- אם ה׳ באייר חל ביום שני, יום העצמאות נדחה ליום שלישי (ו׳ באייר), כדי שטקסי מוצאי שבת של יום הזיכרון לא ייפלו על מוצאי שבת.
- אם ה׳ באייר חל בראשון, שלישי או רביעי, אין דחייה.
- יום השואה (כ״ז בניסן) נדחה באופן דומה: אם הוא חל ביום שישי הוא מוקדם לחמישי (כ״ו בניסן); אם הוא חל בראשון הוא נדחה לשני (כ״ח בניסן).
ב-2026, ה׳ באייר חל ביום רביעי (22 באפריל), כך שאין דחייה. בשנים אחרות תמיד אמתו עם pyluach או hebcal.
דוגמאות
דוגמה 1: המרה פשוטה
המשתמש אומר: "מה התאריך העברי היום?" תוצאה: "24 בפברואר 2026 = ז׳ באדר תשפ״ו" (תשפ״ו אינה שנה מעוברת, ולכן יש רק אדר אחד)
דוגמה 2: חיפוש חג
המשתמש אומר: "מתי פסח 2026?" תוצאה: "פסח מתחיל בערב 1 באפריל 2026 (ט״ו בניסן תשפ״ו). ליל הסדר הראשון: 2 באפריל. יום אחרון בישראל: 8 באפריל."
דוגמה 3: ימי עסקים
המשתמש אומר: "כמה ימי עסקים יש בין 1 למרץ ל-31 במרץ 2026?" תוצאה: ספירה ללא שבתות, עם ציון אם חגים חלים בטווח (פורים ב-3 במרץ, שושן פורים ב-4 במרץ).
משאבים מצורפים
סקריפטים
scripts/convert_date.py, ממיר בין הלוח העברי ללועזי, מעצב תאריכים כפולים למסמכים ישראליים, מציג רשימת חגים ישראליים לכל שנה, וסופר ימי עסקים ישראליים בין טווחי תאריכים (ללא שבתות וחגים). דורש ספרייתpyluach. הרצה:python scripts/convert_date.py --help
חומרי עזר
references/hebrew-calendar-reference.md, מדריך מקיף ללוח העברי הכולל שמות חודשים ואורכם המשתנה, מחזור המטון בן 19 שנים לשנים מעוברות, טבלת המרת גימטריה עם מקרים מיוחדים, לוח חגים ישראלי עם ימי חופשה מלאה מול סגירה חלקית, וספריות Python מומלצות (pyluach, hebcal). עיינו בו בעת טיפול במקרי קצה של שנים מעוברות, עיצוב מספרים עבריים, או קביעה אילו חגים משפיעים על חישובי ימי עסקים.
מלכודות נפוצות
- לחודשים בלוח העברי אורך משתנה (29 או 30 ימים) ושנים מעוברות מוסיפות חודש שלם (אדר ב'). סוכנים עלולים להניח אורכי חודש קבועים או כללי שנה מעוברת לועזיים.
- מסמכים רשמיים ישראליים משתמשים בתאריכים עבריים (למשל "כ"ה באדר תשפ"ו") בעוד מסמכים עסקיים משתמשים בפורמט DD/MM/YYYY לועזי. סוכנים עלולים לא לדעת איזה פורמט להשתמש באיזה הקשר.
- חגים יהודיים זזים ביחס ללוח הלועזי כל שנה. סוכנים עם נתוני אימון סטטיים עלולים לצטט תאריכים שגויים לראש השנה, פסח וכו' בשנה הנוכחית.
- השנה העברית מתחילה בתשרי (ספטמבר/אוקטובר), לא בינואר. סוכנים עלולים לחשב שגוי את גבולות השנה העברית בהמרת תאריכים סמוכים לשנה הלועזית החדשה.
- יום הזיכרון, יום העצמאות ויום השואה כפופים לדחיית מועד חוקתית כדי להימנע מהתנגשות עם שבת. טבלאות סטטיות שמקבעות "ה׳ באייר" בלי לבדוק את היום בשבוע ידפיסו תאריך שגוי בערך בחצי מהשנים. תמיד הריצו את כללי הדחייה למעלה.
- חנוכה בדרך כלל נופל על שתי שנים לועזיות (סוף דצמבר עד תחילת ינואר). כשמסמנים עמודה לפי שנה לועזית, בחרו את השנה העברית שבה כ״ה כסלו באמת נופל בתוך אותה שנה לועזית. ערבוב של תאריכי תשפ״ו ותשפ״ז באותה שורה הוא טעות נפוצה.
פתרון בעיות
שגיאה: "Incorrect Hebrew date"
סיבה: אורך החודשים העבריים משתנה; חודשים בשנה מעוברת עלולים לבלבל פתרון: אמתו מול hebcal.com. אדר א׳/ב׳ קיימים רק בשנים מעוברות. סטטוס השנה הנוכחית (תשפ״ו) כשנה מעוברת משפיע על התאריכים.
Related skills
FAQ
Is Idf Date Converter safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.