From f6b38d6e027e4d6bd42af57ccd27cbcc976820cf Mon Sep 17 00:00:00 2001 From: MaxBGreenberg Date: Tue, 16 Jan 2024 21:19:46 -0500 Subject: [PATCH 01/18] changed github.com/hebcal/hebcal-go to github.com/MaxBGreenber/hebcal-go --- event/dafyomi.go | 4 ++-- event/hdate.go | 2 +- event/holiday.go | 2 +- event/molad.go | 4 ++-- event/myomi.go | 4 ++-- event/nachyomi.go | 4 ++-- event/parsha.go | 4 ++-- event/yyomi.go | 4 ++-- go.mod | 14 ++++++++++---- go.sum | 5 ++++- hebcal/candles.go | 6 +++--- hebcal/hebcal.go | 18 +++++++++--------- hebcal/holidays.go | 4 ++-- hebcal/options.go | 6 +++--- molad/molad_test.go | 4 ++-- nachyomi/nachyomi.go | 2 +- nachyomi/nachyomi_test.go | 4 ++-- omer/omer.go | 4 ++-- omer/omer_test.go | 2 +- sedra/sedra_test.go | 2 +- yerushalmi/yyomi.go | 2 +- yerushalmi/yyomi_test.go | 4 ++-- zmanim/location_test.go | 2 +- zmanim/zmanim_test.go | 2 +- 24 files changed, 59 insertions(+), 50 deletions(-) diff --git a/event/dafyomi.go b/event/dafyomi.go index b8ca4f0..4285252 100644 --- a/event/dafyomi.go +++ b/event/dafyomi.go @@ -5,8 +5,8 @@ import ( "github.com/hebcal/gematriya" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/dafyomi" - "github.com/hebcal/hebcal-go/locales" + "github.com/MaxBGreenberg/hebcal-go/dafyomi" + "github.com/MaxBGreenberg/hebcal-go/locales" ) type dafYomiEvent struct { diff --git a/event/hdate.go b/event/hdate.go index 58e60ef..6d627f5 100644 --- a/event/hdate.go +++ b/event/hdate.go @@ -6,7 +6,7 @@ import ( "github.com/dustin/go-humanize" "github.com/hebcal/gematriya" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/locales" + "github.com/MaxBGreenberg/hebcal-go/locales" ) type hebrewDateEvent struct { diff --git a/event/holiday.go b/event/holiday.go index 2226351..eab86a7 100644 --- a/event/holiday.go +++ b/event/holiday.go @@ -4,7 +4,7 @@ import ( "regexp" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/locales" + "github.com/MaxBGreenberg/hebcal-go/locales" ) // HolidayEvent represents a built-in holiday like Pesach, Purim or Tu BiShvat diff --git a/event/molad.go b/event/molad.go index cd45200..6307b3a 100644 --- a/event/molad.go +++ b/event/molad.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/locales" - "github.com/hebcal/hebcal-go/molad" + "github.com/MaxBGreenberg/hebcal-go/locales" + "github.com/MaxBGreenberg/hebcal-go/molad" ) type moladEvent struct { diff --git a/event/myomi.go b/event/myomi.go index 444fdd4..8a608bc 100644 --- a/event/myomi.go +++ b/event/myomi.go @@ -4,8 +4,8 @@ import ( "strconv" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/locales" - "github.com/hebcal/hebcal-go/mishnayomi" + "github.com/MaxBGreenberg/hebcal-go/locales" + "github.com/MaxBGreenberg/hebcal-go/mishnayomi" ) type mishnaYomiEvent struct { diff --git a/event/nachyomi.go b/event/nachyomi.go index ca5aa2f..fa04b8a 100644 --- a/event/nachyomi.go +++ b/event/nachyomi.go @@ -5,8 +5,8 @@ import ( "github.com/hebcal/gematriya" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/dafyomi" - "github.com/hebcal/hebcal-go/locales" + "github.com/MaxBGreenberg/hebcal-go/dafyomi" + "github.com/MaxBGreenberg/hebcal-go/locales" ) type nachYomiEvent struct { diff --git a/event/parsha.go b/event/parsha.go index 5430f83..20dc1be 100644 --- a/event/parsha.go +++ b/event/parsha.go @@ -4,8 +4,8 @@ import ( "strings" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/locales" - "github.com/hebcal/hebcal-go/sedra" + "github.com/MaxBGreenberg/hebcal-go/locales" + "github.com/MaxBGreenberg/hebcal-go/sedra" ) // Represents one of 54 weekly Torah portions, always on a Saturday diff --git a/event/yyomi.go b/event/yyomi.go index af1081e..ec01370 100644 --- a/event/yyomi.go +++ b/event/yyomi.go @@ -5,8 +5,8 @@ import ( "github.com/hebcal/gematriya" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/dafyomi" - "github.com/hebcal/hebcal-go/locales" + "github.com/MaxBGreenberg/hebcal-go/dafyomi" + "github.com/MaxBGreenberg/hebcal-go/locales" ) type yyomiEvent struct { diff --git a/go.mod b/go.mod index 29aa221..877fe09 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,19 @@ -module github.com/hebcal/hebcal-go +module MaxBGreenberg/hebcal-go -go 1.13 - -require github.com/stretchr/testify v1.8.1 +go 1.21.5 require ( github.com/dustin/go-humanize v1.0.1 github.com/hebcal/gematriya v1.0.1 github.com/hebcal/greg v1.0.0 github.com/hebcal/hdate v1.0.2 + github.com/hebcal/hebcal-go v0.9.26 github.com/nathan-osman/go-sunrise v1.1.0 + github.com/stretchr/testify v1.8.4 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index f442315..8d318ab 100644 --- a/go.sum +++ b/go.sum @@ -9,6 +9,8 @@ github.com/hebcal/greg v1.0.0 h1:F38VvHeYwhLIBtMQ4tl97jOfQhzeKX53Sa1T63RE31k= github.com/hebcal/greg v1.0.0/go.mod h1:HhnDLPDm/dgcrANH5WYN9ol0tlkK/6mJVkWDIYhkKJM= github.com/hebcal/hdate v1.0.2 h1:2rz3GIW6buoSPuywZ0AAjJAwcRFmtbIo4hOv+Otu+Xs= github.com/hebcal/hdate v1.0.2/go.mod h1:EXz7O48tnOqmTHC9wat7JJ2+f7OLZ2c4m+x4gnaiLcQ= +github.com/hebcal/hebcal-go v0.9.26 h1:zYRVdu2uEqq7Y/sHKU5T8BTYPCDFV1J41LXm2TBv3xo= +github.com/hebcal/hebcal-go v0.9.26/go.mod h1:gxujQyn5sq/c9+NzJGm+OABxZg+xFH9oylfKY/PoMVQ= github.com/nathan-osman/go-sunrise v1.1.0 h1:ZqZmtmtzs8Os/DGQYi0YMHpuUqR/iRoJK+wDO0wTCw8= github.com/nathan-osman/go-sunrise v1.1.0/go.mod h1:RcWqhT+5ShCZDev79GuWLayetpJp78RSjSWxiDowmlM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -18,8 +20,9 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/hebcal/candles.go b/hebcal/candles.go index 2555544..3476159 100644 --- a/hebcal/candles.go +++ b/hebcal/candles.go @@ -22,9 +22,9 @@ import ( "time" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/event" - "github.com/hebcal/hebcal-go/locales" - "github.com/hebcal/hebcal-go/zmanim" + "github.com/MaxBGreenberg/hebcal-go/event" + "github.com/MaxBGreenberg/hebcal-go/locales" + "github.com/MaxBGreenberg/hebcal-go/zmanim" ) func formatTime(t *time.Time, opts *CalOptions) string { diff --git a/hebcal/hebcal.go b/hebcal/hebcal.go index 064f4ba..5b4abcf 100644 --- a/hebcal/hebcal.go +++ b/hebcal/hebcal.go @@ -24,15 +24,15 @@ import ( "github.com/hebcal/greg" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/dafyomi" - "github.com/hebcal/hebcal-go/event" - "github.com/hebcal/hebcal-go/mishnayomi" - "github.com/hebcal/hebcal-go/molad" - "github.com/hebcal/hebcal-go/nachyomi" - "github.com/hebcal/hebcal-go/omer" - "github.com/hebcal/hebcal-go/sedra" - "github.com/hebcal/hebcal-go/yerushalmi" - "github.com/hebcal/hebcal-go/zmanim" + "github.com/MaxBGreenberg/hebcal-go/dafyomi" + "github.com/MaxBGreenberg/hebcal-go/event" + "github.com/MaxBGreenberg/hebcal-go/mishnayomi" + "github.com/MaxBGreenberg/hebcal-go/molad" + "github.com/MaxBGreenberg/hebcal-go/nachyomi" + "github.com/MaxBGreenberg/hebcal-go/omer" + "github.com/MaxBGreenberg/hebcal-go/sedra" + "github.com/MaxBGreenberg/hebcal-go/yerushalmi" + "github.com/MaxBGreenberg/hebcal-go/zmanim" ) /* diff --git a/hebcal/holidays.go b/hebcal/holidays.go index 85e152d..280bf11 100644 --- a/hebcal/holidays.go +++ b/hebcal/holidays.go @@ -23,8 +23,8 @@ import ( "time" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/event" - "github.com/hebcal/hebcal-go/sedra" + "github.com/MaxBGreenberg/hebcal-go/event" + "github.com/MaxBGreenberg/hebcal-go/sedra" ) type holiday struct { diff --git a/hebcal/options.go b/hebcal/options.go index b4caa6d..e6edddc 100644 --- a/hebcal/options.go +++ b/hebcal/options.go @@ -20,9 +20,9 @@ import ( "time" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/event" - "github.com/hebcal/hebcal-go/yerushalmi" - "github.com/hebcal/hebcal-go/zmanim" + "github.com/MaxBGreenberg/hebcal-go/event" + "github.com/MaxBGreenberg/hebcal-go/yerushalmi" + "github.com/MaxBGreenberg/hebcal-go/zmanim" ) // UserEvent is used for generating a non-yahrtzeit user event. diff --git a/molad/molad_test.go b/molad/molad_test.go index d839942..8cac7b7 100644 --- a/molad/molad_test.go +++ b/molad/molad_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/event" - "github.com/hebcal/hebcal-go/molad" + "github.com/MaxBGreenberg/hebcal-go/event" + "github.com/MaxBGreenberg/hebcal-go/molad" "github.com/stretchr/testify/assert" ) diff --git a/nachyomi/nachyomi.go b/nachyomi/nachyomi.go index e53fcc2..244329c 100644 --- a/nachyomi/nachyomi.go +++ b/nachyomi/nachyomi.go @@ -26,7 +26,7 @@ import ( "github.com/hebcal/greg" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/dafyomi" + "github.com/MaxBGreenberg/hebcal-go/dafyomi" ) // Nach Yomi takes slightly longer than two years, diff --git a/nachyomi/nachyomi_test.go b/nachyomi/nachyomi_test.go index 38cc8bb..2f32e1f 100644 --- a/nachyomi/nachyomi_test.go +++ b/nachyomi/nachyomi_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/dafyomi" - "github.com/hebcal/hebcal-go/nachyomi" + "github.com/MaxBGreenberg/hebcal-go/dafyomi" + "github.com/hebcal/MaxBGreenberg/nachyomi" "github.com/stretchr/testify/assert" ) diff --git a/omer/omer.go b/omer/omer.go index d1e1fdd..51d348d 100644 --- a/omer/omer.go +++ b/omer/omer.go @@ -24,8 +24,8 @@ import ( "github.com/dustin/go-humanize" "github.com/hebcal/gematriya" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/event" - "github.com/hebcal/hebcal-go/locales" + "github.com/MaxBGreenberg/hebcal-go/event" + "github.com/MaxBGreenberg/hebcal-go/locales" ) type OmerEvent struct { diff --git a/omer/omer_test.go b/omer/omer_test.go index 860169e..a507780 100644 --- a/omer/omer_test.go +++ b/omer/omer_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/omer" + "github.com/MaxBGreenberg/hebcal-go/omer" "github.com/stretchr/testify/assert" ) diff --git a/sedra/sedra_test.go b/sedra/sedra_test.go index 79a9be3..e6ef07d 100644 --- a/sedra/sedra_test.go +++ b/sedra/sedra_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/sedra" + "github.com/MaxBGreenberg/hebcal-go/sedra" "github.com/stretchr/testify/assert" ) diff --git a/yerushalmi/yyomi.go b/yerushalmi/yyomi.go index 04194d9..59deb51 100644 --- a/yerushalmi/yyomi.go +++ b/yerushalmi/yyomi.go @@ -9,7 +9,7 @@ import ( "github.com/hebcal/greg" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/dafyomi" + "github.com/MaxBGreenberg/hebcal-go/dafyomi" ) // Using the Vilna edition, the Yerushalmi Daf Yomi program takes diff --git a/yerushalmi/yyomi_test.go b/yerushalmi/yyomi_test.go index 09fa159..6fe3dba 100644 --- a/yerushalmi/yyomi_test.go +++ b/yerushalmi/yyomi_test.go @@ -6,8 +6,8 @@ import ( "time" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/dafyomi" - "github.com/hebcal/hebcal-go/yerushalmi" + "github.com/MaxBGreenberg/hebcal-go/dafyomi" + "github.com/MaxBGreenberg/hebcal-go/yerushalmi" "github.com/stretchr/testify/assert" ) diff --git a/zmanim/location_test.go b/zmanim/location_test.go index 0466395..792041e 100644 --- a/zmanim/location_test.go +++ b/zmanim/location_test.go @@ -3,7 +3,7 @@ package zmanim_test import ( "testing" - "github.com/hebcal/hebcal-go/zmanim" + "github.com/MaxBGreenberg/hebcal-go/zmanim" ) func TestNoDuplicateCities(t *testing.T) { diff --git a/zmanim/zmanim_test.go b/zmanim/zmanim_test.go index ea2bfce..deca3f1 100644 --- a/zmanim/zmanim_test.go +++ b/zmanim/zmanim_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/hebcal/hebcal-go/zmanim" + "github.com/MaxBGreenberg/hebcal-go/zmanim" "github.com/stretchr/testify/assert" ) From f8d13b80d6a093bea2d117746aac8801f697921e Mon Sep 17 00:00:00 2001 From: MaxBGreenberg Date: Tue, 16 Jan 2024 21:32:29 -0500 Subject: [PATCH 02/18] corrected module path error in nachyomi_test.go --- go.mod | 2 +- nachyomi/nachyomi_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 877fe09..c042774 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module MaxBGreenberg/hebcal-go +module github.com/MaxBGreenberg/hebcal-go go 1.21.5 diff --git a/nachyomi/nachyomi_test.go b/nachyomi/nachyomi_test.go index 2f32e1f..255af73 100644 --- a/nachyomi/nachyomi_test.go +++ b/nachyomi/nachyomi_test.go @@ -8,7 +8,7 @@ import ( "github.com/hebcal/hdate" "github.com/MaxBGreenberg/hebcal-go/dafyomi" - "github.com/hebcal/MaxBGreenberg/nachyomi" + "github.com/MaxBGreenberg/hebcal.go/nachyomi" "github.com/stretchr/testify/assert" ) From 5684810ab02a6647698e952b47b1cbc088c9e805 Mon Sep 17 00:00:00 2001 From: MaxBGreenberg Date: Tue, 16 Jan 2024 21:38:05 -0500 Subject: [PATCH 03/18] fixed error in module name --- nachyomi/nachyomi_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nachyomi/nachyomi_test.go b/nachyomi/nachyomi_test.go index 255af73..03a7c99 100644 --- a/nachyomi/nachyomi_test.go +++ b/nachyomi/nachyomi_test.go @@ -8,7 +8,7 @@ import ( "github.com/hebcal/hdate" "github.com/MaxBGreenberg/hebcal-go/dafyomi" - "github.com/MaxBGreenberg/hebcal.go/nachyomi" + "github.com/MaxBGreenberg/hebcal-go/nachyomi" "github.com/stretchr/testify/assert" ) From c44fbefaade0135b50ee2986fc07c6036748b2fe Mon Sep 17 00:00:00 2001 From: MaxBGreenberg Date: Tue, 16 Jan 2024 22:40:41 -0500 Subject: [PATCH 04/18] Moved Magen Avraham times to be displayed before Gra times --- hebcal/candles.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hebcal/candles.go b/hebcal/candles.go index 3476159..0f1d7bd 100644 --- a/hebcal/candles.go +++ b/hebcal/candles.go @@ -247,10 +247,10 @@ func dailyZemanim(date hdate.HDate, opts *CalOptions) []event.CalEvent { {"Misheyakir Machmir", z.MisheyakirMachmir()}, {"Dawn", z.Dawn()}, {"Sunrise", z.Sunrise()}, - {"Kriat Shema, sof zeman", z.SofZmanShma()}, {"Kriat Shema, sof zeman (MGA)", z.SofZmanShmaMGA()}, - {"Tefilah, sof zeman", z.SofZmanTfilla()}, + {"Kriat Shema, sof zeman", z.SofZmanShma()}, {"Tefilah, sof zeman (MGA)", z.SofZmanTfillaMGA()}, + {"Tefilah, sof zeman", z.SofZmanTfilla()}, {"Chatzot hayom", z.Chatzot()}, {"Mincha Gedolah", z.MinchaGedola()}, {"Mincha Ketanah", z.MinchaKetana()}, From 0e74ca6b4a13bf78aa0693327ce05714c1a434c3 Mon Sep 17 00:00:00 2001 From: MaxBGreenberg Date: Wed, 17 Jan 2024 20:11:59 -0500 Subject: [PATCH 05/18] removed remaning references to github.com/hebcal/hebcal-go in files --- dafyomi/dafyomi_test.go | 2 +- event/event_test.go | 4 ++-- hebcal/hebcal_test.go | 8 ++++---- hebcal/holidays_test.go | 4 ++-- hebcal/nachyomi_test.go | 2 +- mishnayomi/myomi_test.go | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dafyomi/dafyomi_test.go b/dafyomi/dafyomi_test.go index 1c8f2f7..479c982 100644 --- a/dafyomi/dafyomi_test.go +++ b/dafyomi/dafyomi_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/dafyomi" + "github.com/MaxBGreenberg/hebcal-go/dafyomi" "github.com/stretchr/testify/assert" ) diff --git a/event/event_test.go b/event/event_test.go index cfba106..986c9f0 100644 --- a/event/event_test.go +++ b/event/event_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/event" - "github.com/hebcal/hebcal-go/sedra" + "github.com/MaxBGreenberg/hebcal-go/event" + "github.com/MaxBGreenberg/hebcal-go/sedra" "github.com/stretchr/testify/assert" ) diff --git a/hebcal/hebcal_test.go b/hebcal/hebcal_test.go index 49c84cc..c99c871 100644 --- a/hebcal/hebcal_test.go +++ b/hebcal/hebcal_test.go @@ -7,10 +7,10 @@ import ( "time" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/event" - "github.com/hebcal/hebcal-go/hebcal" - "github.com/hebcal/hebcal-go/yerushalmi" - "github.com/hebcal/hebcal-go/zmanim" + "github.com/MaxBGreenberg/hebcal-go/event" + "github.com/MaxBGreenberg/hebcal-go/hebcal" + "github.com/MaxBGreenberg/hebcal-go/yerushalmi" + "github.com/MaxBGreenberg/hebcal-go/zmanim" "github.com/stretchr/testify/assert" ) diff --git a/hebcal/holidays_test.go b/hebcal/holidays_test.go index 951fa10..4e383c6 100644 --- a/hebcal/holidays_test.go +++ b/hebcal/holidays_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/event" - "github.com/hebcal/hebcal-go/hebcal" + "github.com/MaxBGreenberg/hebcal-go/event" + "github.com/MaxBGreenberg/hebcal-go/hebcal" "github.com/stretchr/testify/assert" ) diff --git a/hebcal/nachyomi_test.go b/hebcal/nachyomi_test.go index 1c8749c..dcfcc9e 100644 --- a/hebcal/nachyomi_test.go +++ b/hebcal/nachyomi_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/hebcal" + "github.com/MaxBGreenberg/hebcal-go/hebcal" "github.com/stretchr/testify/assert" ) diff --git a/mishnayomi/myomi_test.go b/mishnayomi/myomi_test.go index a77eba9..e537e7a 100644 --- a/mishnayomi/myomi_test.go +++ b/mishnayomi/myomi_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/hebcal/hdate" - "github.com/hebcal/hebcal-go/mishnayomi" + "github.com/MaxBGreenberg/hebcal-go/mishnayomi" "github.com/stretchr/testify/assert" ) From 7b53829901aa6aba70e5c68be9e962ea093bcf5c Mon Sep 17 00:00:00 2001 From: MaxBGreenberg Date: Wed, 17 Jan 2024 20:34:44 -0500 Subject: [PATCH 06/18] added explicity mention of the gra in zmanim printout for his shita --- hebcal/candles.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hebcal/candles.go b/hebcal/candles.go index 0f1d7bd..0e083b1 100644 --- a/hebcal/candles.go +++ b/hebcal/candles.go @@ -248,9 +248,9 @@ func dailyZemanim(date hdate.HDate, opts *CalOptions) []event.CalEvent { {"Dawn", z.Dawn()}, {"Sunrise", z.Sunrise()}, {"Kriat Shema, sof zeman (MGA)", z.SofZmanShmaMGA()}, - {"Kriat Shema, sof zeman", z.SofZmanShma()}, + {"Kriat Shema, sof zeman (GRA)", z.SofZmanShma()}, {"Tefilah, sof zeman (MGA)", z.SofZmanTfillaMGA()}, - {"Tefilah, sof zeman", z.SofZmanTfilla()}, + {"Tefilah, sof zeman (GRA)", z.SofZmanTfilla()}, {"Chatzot hayom", z.Chatzot()}, {"Mincha Gedolah", z.MinchaGedola()}, {"Mincha Ketanah", z.MinchaKetana()}, From 3d3f2a70c50438e3214620fcec0dbc2da70ca1a7 Mon Sep 17 00:00:00 2001 From: MaxBGreenberg Date: Wed, 17 Jan 2024 20:48:32 -0500 Subject: [PATCH 07/18] change tzeis hakochavim from 8.5 degrees to 7.083 degrees --- go.mod | 1 - go.sum | 2 -- zmanim/zmanim.go | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/go.mod b/go.mod index c042774..e50bd92 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,6 @@ require ( github.com/hebcal/gematriya v1.0.1 github.com/hebcal/greg v1.0.0 github.com/hebcal/hdate v1.0.2 - github.com/hebcal/hebcal-go v0.9.26 github.com/nathan-osman/go-sunrise v1.1.0 github.com/stretchr/testify v1.8.4 ) diff --git a/go.sum b/go.sum index 8d318ab..5ed767a 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,6 @@ github.com/hebcal/greg v1.0.0 h1:F38VvHeYwhLIBtMQ4tl97jOfQhzeKX53Sa1T63RE31k= github.com/hebcal/greg v1.0.0/go.mod h1:HhnDLPDm/dgcrANH5WYN9ol0tlkK/6mJVkWDIYhkKJM= github.com/hebcal/hdate v1.0.2 h1:2rz3GIW6buoSPuywZ0AAjJAwcRFmtbIo4hOv+Otu+Xs= github.com/hebcal/hdate v1.0.2/go.mod h1:EXz7O48tnOqmTHC9wat7JJ2+f7OLZ2c4m+x4gnaiLcQ= -github.com/hebcal/hebcal-go v0.9.26 h1:zYRVdu2uEqq7Y/sHKU5T8BTYPCDFV1J41LXm2TBv3xo= -github.com/hebcal/hebcal-go v0.9.26/go.mod h1:gxujQyn5sq/c9+NzJGm+OABxZg+xFH9oylfKY/PoMVQ= github.com/nathan-osman/go-sunrise v1.1.0 h1:ZqZmtmtzs8Os/DGQYi0YMHpuUqR/iRoJK+wDO0wTCw8= github.com/nathan-osman/go-sunrise v1.1.0/go.mod h1:RcWqhT+5ShCZDev79GuWLayetpJp78RSjSWxiDowmlM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/zmanim/zmanim.go b/zmanim/zmanim.go index 1cebd1d..5af7fbb 100644 --- a/zmanim/zmanim.go +++ b/zmanim/zmanim.go @@ -224,7 +224,7 @@ func (z *Zmanim) PlagHaMincha() time.Time { // For 3 medium stars use 7.083° func (z *Zmanim) Tzeit(angle float64) time.Time { if angle == 0 { - angle = Tzeit3SmallStars + angle = Tzeit3MediumStars } return z.timeAtAngle(angle, false) } From 45b00a9484d1b177ef50c6af4df0f1fd9d35a201 Mon Sep 17 00:00:00 2001 From: MaxBGreenberg Date: Wed, 17 Jan 2024 20:52:20 -0500 Subject: [PATCH 08/18] changed tzeis shita from 3 small stars to 3 medium stars in candles.go --- hebcal/candles.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hebcal/candles.go b/hebcal/candles.go index 0e083b1..281c90d 100644 --- a/hebcal/candles.go +++ b/hebcal/candles.go @@ -257,7 +257,7 @@ func dailyZemanim(date hdate.HDate, opts *CalOptions) []event.CalEvent { {"Plag HaMincha", z.PlagHaMincha()}, {"Sunset", z.Sunset()}, {"Dusk", z.Dusk()}, - {"Tzeit HaKochavim", z.Tzeit(zmanim.Tzeit3SmallStars)}, + {"Tzeit HaKochavim", z.Tzeit(zmanim.Tzeit3MediumStars)}, } events := make([]event.CalEvent, 0, len(times)) for _, zman := range times { From 96f417e62b94664c1f1a3409eb2106b2ca3d1c56 Mon Sep 17 00:00:00 2001 From: MaxBGreenberg Date: Wed, 17 Jan 2024 21:04:09 -0500 Subject: [PATCH 09/18] remove civil dawn and civil dusk (6 degrees) from zmanim printout as far as I can tell there is no halakhic need for these --- hebcal/candles.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hebcal/candles.go b/hebcal/candles.go index 281c90d..11d86c8 100644 --- a/hebcal/candles.go +++ b/hebcal/candles.go @@ -245,7 +245,7 @@ func dailyZemanim(date hdate.HDate, opts *CalOptions) []event.CalEvent { {"Alot haShachar", z.AlotHaShachar()}, {"Misheyakir", z.Misheyakir()}, {"Misheyakir Machmir", z.MisheyakirMachmir()}, - {"Dawn", z.Dawn()}, + //{"Dawn", z.Dawn()}, {"Sunrise", z.Sunrise()}, {"Kriat Shema, sof zeman (MGA)", z.SofZmanShmaMGA()}, {"Kriat Shema, sof zeman (GRA)", z.SofZmanShma()}, @@ -256,7 +256,7 @@ func dailyZemanim(date hdate.HDate, opts *CalOptions) []event.CalEvent { {"Mincha Ketanah", z.MinchaKetana()}, {"Plag HaMincha", z.PlagHaMincha()}, {"Sunset", z.Sunset()}, - {"Dusk", z.Dusk()}, + //{"Dusk", z.Dusk()}, {"Tzeit HaKochavim", z.Tzeit(zmanim.Tzeit3MediumStars)}, } events := make([]event.CalEvent, 0, len(times)) From 412e36a63d877173e92ad1479e75f56b4bc260da Mon Sep 17 00:00:00 2001 From: MaxBGreenberg <122072621+MaxBGreenberg@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:23:12 -0500 Subject: [PATCH 10/18] Added bein hashmashos calculation to zmanim.go --- zmanim/zmanim.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zmanim/zmanim.go b/zmanim/zmanim.go index 5af7fbb..ab554b7 100644 --- a/zmanim/zmanim.go +++ b/zmanim/zmanim.go @@ -229,6 +229,13 @@ func (z *Zmanim) Tzeit(angle float64) time.Time { return z.timeAtAngle(angle, false) } +// Rabbeinu Tam holds that bein hashmashos is a specific time between sunset and tzeis hakochavim +// One opinion on how to calculate this time is that it is 13.5 minutes before tzies 7.083 +func (z *Zmanim) BeinHashmashos() time.Time { + tzeis=z.Tzeit(Tzeit3MediumStars) + return tzeis.Add(-13.5 *time.Minute) +} + func (z *Zmanim) riseSetOffset(t time.Time, offset int, roundTime bool) time.Time { if t == nilTime { return t From 467a1612b70510a695c2d5cf7632806da27d9a17 Mon Sep 17 00:00:00 2001 From: MaxBGreenberg <122072621+MaxBGreenberg@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:26:26 -0500 Subject: [PATCH 11/18] added printing of zman for bein hashmashos to zmanim list in candles.go --- hebcal/candles.go | 1 + 1 file changed, 1 insertion(+) diff --git a/hebcal/candles.go b/hebcal/candles.go index 11d86c8..12c6cc6 100644 --- a/hebcal/candles.go +++ b/hebcal/candles.go @@ -256,6 +256,7 @@ func dailyZemanim(date hdate.HDate, opts *CalOptions) []event.CalEvent { {"Mincha Ketanah", z.MinchaKetana()}, {"Plag HaMincha", z.PlagHaMincha()}, {"Sunset", z.Sunset()}, + {" Bein HaShemashot", z.BeinHashmashos()}, //{"Dusk", z.Dusk()}, {"Tzeit HaKochavim", z.Tzeit(zmanim.Tzeit3MediumStars)}, } From 4811801a83fc83782867cacf98b2251db7c0cf34 Mon Sep 17 00:00:00 2001 From: MaxBGreenberg <122072621+MaxBGreenberg@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:36:40 -0500 Subject: [PATCH 12/18] removed extra white space in candles.go --- hebcal/candles.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hebcal/candles.go b/hebcal/candles.go index 12c6cc6..a099714 100644 --- a/hebcal/candles.go +++ b/hebcal/candles.go @@ -256,7 +256,7 @@ func dailyZemanim(date hdate.HDate, opts *CalOptions) []event.CalEvent { {"Mincha Ketanah", z.MinchaKetana()}, {"Plag HaMincha", z.PlagHaMincha()}, {"Sunset", z.Sunset()}, - {" Bein HaShemashot", z.BeinHashmashos()}, + {"Bein HaShemashot", z.BeinHashmashos()}, //{"Dusk", z.Dusk()}, {"Tzeit HaKochavim", z.Tzeit(zmanim.Tzeit3MediumStars)}, } From 184a319ef1a9f0f580356b3e73c5849328e7e406 Mon Sep 17 00:00:00 2001 From: MaxBGreenberg <122072621+MaxBGreenberg@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:37:49 -0500 Subject: [PATCH 13/18] Modified candles.go. removed earlier misheyakir from zmanim list, relabled Misheyakir Machmis as Misheyakir --- hebcal/candles.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hebcal/candles.go b/hebcal/candles.go index a099714..c92cbba 100644 --- a/hebcal/candles.go +++ b/hebcal/candles.go @@ -243,8 +243,8 @@ func dailyZemanim(date hdate.HDate, opts *CalOptions) []event.CalEvent { t time.Time }{ {"Alot haShachar", z.AlotHaShachar()}, - {"Misheyakir", z.Misheyakir()}, - {"Misheyakir Machmir", z.MisheyakirMachmir()}, + //{"Misheyakir", z.Misheyakir()}, + {"Misheyakir", z.MisheyakirMachmir()}, //{"Dawn", z.Dawn()}, {"Sunrise", z.Sunrise()}, {"Kriat Shema, sof zeman (MGA)", z.SofZmanShmaMGA()}, From d138b85dac9eeec108378f409b5a7ae9873cd35f Mon Sep 17 00:00:00 2001 From: MaxBGreenberg <122072621+MaxBGreenberg@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:41:08 -0500 Subject: [PATCH 14/18] Update candles.go. Changed chanukka candle lighting time to bein hashmashos rather than dusk --- hebcal/candles.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hebcal/candles.go b/hebcal/candles.go index c92cbba..2df0101 100644 --- a/hebcal/candles.go +++ b/hebcal/candles.go @@ -162,7 +162,7 @@ func makeChanukahCandleLighting(ev event.HolidayEvent, opts *CalOptions) TimedEv year, month, day := hd.Greg() gregDate := time.Date(year, month, day, 0, 0, 0, 0, time.UTC) z := zmanim.New(loc, gregDate) - candleLightingTime := z.Dusk() + candleLightingTime := z.Tzeit(zmanim.Tzeit3MediumStars) if (candleLightingTime == time.Time{}) { return TimedEvent{} // no sunset } From ff188936730c88fd2996ed291f90a573ceca29d5 Mon Sep 17 00:00:00 2001 From: MaxBGreenberg <122072621+MaxBGreenberg@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:50:21 -0500 Subject: [PATCH 15/18] Update candles.go. Added Chatzos Halayla to zmanim printout --- hebcal/candles.go | 1 + 1 file changed, 1 insertion(+) diff --git a/hebcal/candles.go b/hebcal/candles.go index 2df0101..9e69811 100644 --- a/hebcal/candles.go +++ b/hebcal/candles.go @@ -259,6 +259,7 @@ func dailyZemanim(date hdate.HDate, opts *CalOptions) []event.CalEvent { {"Bein HaShemashot", z.BeinHashmashos()}, //{"Dusk", z.Dusk()}, {"Tzeit HaKochavim", z.Tzeit(zmanim.Tzeit3MediumStars)}, + {"Chatzoz Halayla", z.ChatzotNight()}, } events := make([]event.CalEvent, 0, len(times)) for _, zman := range times { From 16c993c5c97227becd93b66a819bb206be974ed3 Mon Sep 17 00:00:00 2001 From: MaxBGreenberg <122072621+MaxBGreenberg@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:11:12 -0500 Subject: [PATCH 16/18] Update go.mod so that minimum version needed to build is 1.13 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e50bd92..66952a3 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/MaxBGreenberg/hebcal-go -go 1.21.5 +go 1.13 require ( github.com/dustin/go-humanize v1.0.1 From 647eb806f19e2b27504ff7569ba418113fc2cd25 Mon Sep 17 00:00:00 2001 From: MaxBGreenberg Date: Mon, 29 Jan 2024 21:51:20 -0500 Subject: [PATCH 17/18] updated hebcal_test.go to account for format of zmanim --- hebcal/hebcal_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hebcal/hebcal_test.go b/hebcal/hebcal_test.go index c99c871..a884c92 100644 --- a/hebcal/hebcal_test.go +++ b/hebcal/hebcal_test.go @@ -421,10 +421,10 @@ func TestDailyZemanim(t *testing.T) { "2021-11-27 Misheyakir Machmir: 05:54", "2021-11-27 Dawn: 06:18", "2021-11-27 Sunrise: 06:49", - "2021-11-27 Kriat Shema, sof zeman: 09:11", "2021-11-27 Kriat Shema, sof zeman (MGA): 08:35", - "2021-11-27 Tefilah, sof zeman: 09:58", + "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 Mincha Gedolah: 11:57", "2021-11-27 Mincha Ketanah: 14:19", From 33c1fa851be32bb5169f7facf21c9c1c59039008 Mon Sep 17 00:00:00 2001 From: MaxBGreenberg Date: Mon, 5 Feb 2024 18:51:27 -0500 Subject: [PATCH 18/18] added zman sof zmam biur chametz for gra and mga to zmanim.go --- zmanim/zmanim.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zmanim/zmanim.go b/zmanim/zmanim.go index ab554b7..e61fd60 100644 --- a/zmanim/zmanim.go +++ b/zmanim/zmanim.go @@ -183,6 +183,14 @@ func (z *Zmanim) SofZmanTfilla() time.Time { return z.hourOffset(4) } + +// On erev pesach, sof zman achilas chametz is at the same time as sof zman fefillah +// Sof zman biur chametz, the latested time it is permitted to have hanaa from chametz, is 1 halchik hour later +// According to the GRA +func (z *Zmanim) SofZmanBiur() time.Time { + return z.hoursOffset(5) +} + func (z *Zmanim) sofZmanMGA(hours float64) time.Time { alot72 := z.SunriseOffset(-72, false) tzeit72 := z.SunsetOffset(72, false) @@ -202,6 +210,11 @@ func (z *Zmanim) SofZmanTfillaMGA() time.Time { return z.sofZmanMGA(4) } +// Sof zman biur chametz accoring to MGA +func (z *Zmanim) SofZmanBiurMGA() time.Time { + return z.sofZmanMGA(5) +} + // Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours func (z *Zmanim) MinchaGedola() time.Time { return z.hourOffset(6.5)