hebcal/hebcal-go

Provide ability to use time.Time

Closed this issue · 3 comments

Being able to convert between dates would be a lot nicer if we could directly use a time.Time instead of arbitrary numbers (especially when it comes to storing and searching dates in a DB, most ORMs have a wrapper for time.Time).

Also, this is an incredibly helpful package (esp. because it showed up right as I needed it) and I can definitely say I will be using it quite a bit in the near future. So thank you very much for making it.

Thanks for the suggestion. We can add time.Time APIs in an upcoming release. Although hebcal has been around for nearly 30 years (!) the Go port is just a week old and is still under active development.

Do you have specific APIs that you would recommend adding (or changing) to use time.Time?

Honestly, pretty much any API that deals with Gregorian dates would be good candidate for using time.Time. But using the time API's could also allow for cool stuff like NextZman(t time.Time) or something like that.

Thanks. We've added a few more APIs that consume time.Time and have done a minor refactoring into sub-packages. Please take a look and let us know if it works for you!

https://pkg.go.dev/github.com/hebcal/hebcal-go@v0.4.1