Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions hebcal/candles.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"time"

"github.com/hebcal/hdate"

"github.com/hebcal/hebcal-go/event"
"github.com/hebcal/hebcal-go/locales"
"github.com/hebcal/hebcal-go/zmanim"
Expand Down Expand Up @@ -242,15 +243,15 @@ func dailyZemanim(date hdate.HDate, opts *CalOptions) []event.CalEvent {
desc string
t time.Time
}{
{"Alot haShachar", z.AlotHaShachar()},
{"Alot HaShachar", z.AlotHaShachar()},
{"Misheyakir", z.Misheyakir()},
{"Misheyakir Machmir", z.MisheyakirMachmir()},
{"Sunrise", z.Sunrise()},
{"Kriat Shema, sof zeman (MGA)", z.SofZmanShmaMGA()},
{"Kriat Shema, sof zeman (GRA)", z.SofZmanShma()},
{"Tefilah, sof zeman (MGA)", z.SofZmanTfillaMGA()},
{"Tefilah, sof zeman (GRA)", z.SofZmanTfilla()},
{"Chatzot hayom", z.Chatzot()},
{"Chatzot HaYom", z.Chatzot()},
{"Mincha Gedolah", z.MinchaGedola()},
{"Mincha Ketanah", z.MinchaKetana()},
{"Plag HaMincha", z.PlagHaMincha()},
Expand Down
64 changes: 62 additions & 2 deletions hebcal/hebcal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,15 @@ func TestDailyZemanim(t *testing.T) {
Hour24: true,
}
checkEvents(t, "en", opts, []string{
"2021-11-27 Alot haShachar: 05:21",
"2021-11-27 Alot HaShachar: 05:21",
"2021-11-27 Misheyakir: 05:47",
"2021-11-27 Misheyakir Machmir: 05:54",
"2021-11-27 Sunrise: 06:49",
"2021-11-27 Kriat Shema, sof zeman (MGA): 08:35",
"2021-11-27 Kriat Shema, sof zeman (GRA): 09:11",
"2021-11-27 Tefilah, sof zeman (MGA): 09:34",
"2021-11-27 Tefilah, sof zeman (GRA): 09:58",
"2021-11-27 Chatzot hayom: 11:33",
"2021-11-27 Chatzot HaYom: 11:33",
"2021-11-27 Mincha Gedolah: 11:57",
"2021-11-27 Mincha Ketanah: 14:19",
"2021-11-27 Plag HaMincha: 15:18",
Expand All @@ -360,6 +360,66 @@ func TestDailyZemanim(t *testing.T) {
})
}

func TestDailyZemanim_He(t *testing.T) {
hd := hdate.New(5782, hdate.Kislev, 23)
loc := zmanim.LookupCity("Providence")
opts := &hebcal.CalOptions{
Start: hd,
End: hd,
NoHolidays: true,
DailyZmanim: true,
Location: loc,
Hour24: true,
}
checkEvents(t, "he", opts, []string{
"2021-11-27 עֲלוֹת הַשַּׁחַר: 05:21",
"2021-11-27 מִשֶּׁיַּכִּיר: 05:47",
"2021-11-27 מִשֶּׁיַּכִּיר מַחְמִיר: 05:54",
"2021-11-27 נֵץ הַחַמָּה: 06:49",
"2021-11-27 סוֹף זְמַן קְרִיאַת שְׁמַע (מג״א): 08:35",
"2021-11-27 סוֹף זְמַן קְרִיאַת שְׁמַע (גְּרָ״א): 09:11",
"2021-11-27 סוֹף זְמַן תְּפִלָּה (מג״א): 09:34",
"2021-11-27 סוֹף זְמַן תְּפִלָּה (גְּרָ״א): 09:58",
"2021-11-27 חֲצוֹת הַיּוֹם: 11:33",
"2021-11-27 מִנְחָה גְּדוֹלָה: 11:57",
"2021-11-27 מִנְחָה קְטַנָּה: 14:19",
"2021-11-27 פְּלַג הַמִּנְחָה: 15:18",
"2021-11-27 שְׁקִיעַת הַחַמָּה: 16:17",
"2021-11-27 בֵּין הַשְּׁמָשׁוֹת: 16:41",
"2021-11-27 צֵאת הַכּוֹכָבִים: 17:02",
})
}

func TestDailyZemanim_Ashkenazi(t *testing.T) {
hd := hdate.New(5782, hdate.Kislev, 23)
loc := zmanim.LookupCity("Providence")
opts := &hebcal.CalOptions{
Start: hd,
End: hd,
NoHolidays: true,
DailyZmanim: true,
Location: loc,
Hour24: true,
}
checkEvents(t, "ashkenazi", opts, []string{
"2021-11-27 Alos HaShachar: 05:21",
"2021-11-27 Misheyakir: 05:47",
"2021-11-27 Misheyakir Machmir: 05:54",
"2021-11-27 Sunrise: 06:49",
"2021-11-27 Krias Shema, sof zman (MGA): 08:35",
"2021-11-27 Krias Shema, sof zman (GRA): 09:11",
"2021-11-27 Tefilah, sof zman (MGA): 09:34",
"2021-11-27 Tefilah, sof zman (GRA): 09:58",
"2021-11-27 Chatzos: 11:33",
"2021-11-27 Mincha Gedolah: 11:57",
"2021-11-27 Mincha Ketanah: 14:19",
"2021-11-27 Plag HaMincha: 15:18",
"2021-11-27 Sunset: 16:17",
"2021-11-27 Bein HaShemashos: 16:41",
"2021-11-27 Tzeis HaKochavim: 17:02",
})
}

func TestHebrewCalendarYYomi(t *testing.T) {
opts := &hebcal.CalOptions{
NoHolidays: true,
Expand Down
7 changes: 6 additions & 1 deletion locales/strings_ashkenazi.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ var dict_ashkenazi = map[string]string{
"Bechorot": "Bechoros",
"Bechukotai": "Bechukosai",
"Beha'alotcha": "Beha’aloscha",
"Bein HaShemashot": "Bein HaShemashos",
"Bekhorot": "Bekhoros",
"Berachot": "Berachos",
"Berakhot": "Berakhos",
"Bereshit": "Bereshis",
"Birkat Hachamah": "Birkas Hachamah",
"Birkat Hachamah": "Birkas HaChamah",
"Birkat HaChamah": "Birkas HaChamah",
"Chanukah Day 1 (on Shabbat)": "Chanukah Day 1 (on Shabbos)",
"Chanukah Day 2 (on Shabbat)": "Chanukah Day 2 (on Shabbos)",
"Chanukah Day 3 (on Shabbat)": "Chanukah Day 3 (on Shabbos)",
Expand All @@ -33,6 +35,7 @@ var dict_ashkenazi = map[string]string{
"Chanukah Day 8 (on Shabbat)": "Chanukah Day 8 (on Shabbos)",
"Chatzot HaLailah": "Chatzos HaLailah",
"Chatzot hayom": "Chatzos",
"Chatzot HaYom": "Chatzos",
"Chukat": "Chukas",
"Eduyot": "Eduyos",
"Erev Shavuot": "Erev Shavuos",
Expand All @@ -44,6 +47,7 @@ var dict_ashkenazi = map[string]string{
"Ki Teitzei": "Ki Seitzei",
"Ki Tisa": "Ki Sisa",
"Kriat Shema, sof zeman": "Krias Shema, sof zman",
"Kriat Shema, sof zeman (GRA)": "Krias Shema, sof zman (GRA)",
"Kriat Shema, sof zeman (MGA)": "Krias Shema, sof zman (MGA)",
"Leil Selichot": "Leil Selichos",
"Maasrot": "Maasros",
Expand Down Expand Up @@ -110,6 +114,7 @@ var dict_ashkenazi = map[string]string{
"Taanit": "Taanis",
"Tahorot": "Tahoros",
"Tefilah, sof zeman": "Tefilah, sof zman",
"Tefilah, sof zeman (GRA)": "Tefilah, sof zman (GRA)",
"Tefilah, sof zeman (MGA)": "Tefilah, sof zman (MGA)",
"Terumot": "Terumos",
"Tevet": "Teves",
Expand Down
20 changes: 20 additions & 0 deletions locales/strings_he.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var dict_he = map[string]string{
"Adar II": "אֲדָר ב׳",
"Admission into the Sanctuary": "הלכות ביאת מקדש",
"Agents and Partners": "הלכות שלוחין ושותפין",
"Alot HaShachar": "עֲלוֹת הַשַּׁחַר",
"Amos": "עָמוּס",
"Appraisals and Devoted Property": "הלכות ערכים וחרמין",
"Arachin": "ערכין",
Expand All @@ -41,6 +42,7 @@ var dict_he = map[string]string{
"Bechukotai": "בְּחֻקֹּתַי",
"Beha'alotcha": "בְּהַעֲלֹתְךָ",
"Behar": "בְּהַר",
"Bein HaShemashot": "בֵּין הַשְּׁמָשׁוֹת",
"Beitzah": "ביצה",
"Bekhorot": "בכורות",
"Ben-Gurion Day": "יוֹם בן־גוריון",
Expand All @@ -50,6 +52,7 @@ var dict_he = map[string]string{
"Beshalach": "בְּשַׁלַּח",
"Bikkurim": "ביכורים",
"Birkat Hachamah": "בִּרְכַּת הַחַמָּה",
"Birkat HaChamah": "בִּרְכַּת הַחַמָּה",
"Blessings": "הלכות ברכות",
"Bo": "בֹּא",
"Borrowing and Deposit": "הלכות שאלה ופיקדון",
Expand Down Expand Up @@ -85,6 +88,9 @@ var dict_he = map[string]string{
"Chanukah: 8 Candles": "חֲנוּכָּה: ח׳ נֵרוֹת",
"Chanukah: 8th Day": "חֲנוּכָּה: יוֹם ח׳",
"Chasimas Hasefer": "חתימת הספר",
"Chatzot HaLailah": "חֲצוֹת הַלַּיְלָה",
"Chatzot hayom": "חֲצוֹת הַיּוֹם",
"Chatzot HaYom": "חֲצוֹת הַיּוֹם",
"Chayei Sara": "חַיֵּי שָֹרָה",
"Cheshvan": "חֶשְׁוָן",
"Chofetz Chaim": "חָפֵץ חַיִּים",
Expand Down Expand Up @@ -204,6 +210,9 @@ var dict_he = map[string]string{
"Kislev": "כִּסְלֵו",
"Klalim": "כללים",
"Korach": "קֹרַח",
"Kriat Shema, sof zeman": "סוֹף זְמַן קְרִיאַת שְׁמַע",
"Kriat Shema, sof zeman (GRA)": "סוֹף זְמַן קְרִיאַת שְׁמַע (גְּרָ״א)",
"Kriat Shema, sof zeman (MGA)": "סוֹף זְמַן קְרִיאַת שְׁמַע (מג״א)",
"Lag BaOmer": "ל״ג בָּעוֹמֶר",
"Lamentations": "אֵיכָה",
"Lavin": "לאווין",
Expand Down Expand Up @@ -235,7 +244,11 @@ var dict_he = map[string]string{
"Miketz": "מִקֵּץ",
"Mikvaot": "מקוואות",
"min": "דַּקּוֹת",
"Mincha Gedolah": "מִנְחָה גְּדוֹלָה",
"Mincha Ketanah": "מִנְחָה קְטַנָּה",
"Minor Prophets": "תְּרֵי עֲשַׂר",
"Misheyakir": "מִשֶּׁיַּכִּיר",
"Misheyakir Machmir": "מִשֶּׁיַּכִּיר מַחְמִיר",
"Mishna Yomi": "מִשְׁנָה יוֹמִי",
"Mishpatim": "מִשְׁפָּטִים",
"Moed Katan": "מועד קטן",
Expand Down Expand Up @@ -301,6 +314,7 @@ var dict_he = map[string]string{
"Pinchas": "פִּינְחָס",
"Pinchas occurring after 17 Tammuz": "פִּינְחָס מתרחש לאחר יז׳ בְּתַמּוּז",
"Pirkei Avot": "פִּרְקֵי אָבוֹת",
"Plag HaMincha": "פְּלַג הַמִּנְחָה",
"Plaintiff and Defendant": "הלכות טוען ונטען",
"Positive Mitzvot": "מצוות עשה",
"Prayer and the Priestly Blessing": "הלכות תפילה וברכת כהנים",
Expand Down Expand Up @@ -421,6 +435,8 @@ var dict_he = map[string]string{
"Sukkot V (CH''M)": "סוּכּוֹת ה׳ (חוה״מ)",
"Sukkot VI (CH''M)": "סוּכּוֹת ו׳ (חוה״מ)",
"Sukkot VII (Hoshana Raba)": "סוּכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)",
"Sunrise": "נֵץ הַחַמָּה",
"Sunset": "שְׁקִיעַת הַחַמָּה",
"Ta'anit Bechorot": "תַּעֲנִית בְּכוֹרוֹת",
"Ta'anit Bechorot (Mincha)": "תַּעֲנִית בְּכוֹרוֹת (מִנְחָה)",
"Ta'anit Esther": "תַּעֲנִית אֶסְתֵּר",
Expand All @@ -432,6 +448,9 @@ var dict_he = map[string]string{
"Tamuz": "תַּמּוּז",
"Tanakh Yomi": "תנ״ך יוֹמִי",
"Tazria": "תַזְרִיעַ",
"Tefilah, sof zeman": "סוֹף זְמַן תְּפִלָּה",
"Tefilah, sof zeman (GRA)": "סוֹף זְמַן תְּפִלָּה (גְּרָ״א)",
"Tefilah, sof zeman (MGA)": "סוֹף זְמַן תְּפִלָּה (מג״א)",
"Tefillin, Mezuzah and the Torah Scroll": "הלכות תפילין ומזוזה וספר תורה",
"Temurah": "תמורה",
"Terumah": "תְּרוּמָה",
Expand Down Expand Up @@ -459,6 +478,7 @@ var dict_he = map[string]string{
"Tu B'Shvat": "ט״וּ בִּשְׁבָט",
"Tu BiShvat": "ט״וּ בִּשְׁבָט",
"Tzav": "צַו",
"Tzeit HaKochavim": "צֵאת הַכּוֹכָבִים",
"Tziyurim": "ציורים",
"Tzom Gedaliah": "צוֹם גְּדַלְיָה",
"Tzom Gedaliah (Mincha)": "צוֹם גְּדַלְיָה (מִנְחָה)",
Expand Down