Skip to content

Add unit test for AstronomicalCalendar#27

Open
mjradwin wants to merge 1 commit intoBehindTheMath:masterfrom
mjradwin:add-unit-test
Open

Add unit test for AstronomicalCalendar#27
mjradwin wants to merge 1 commit intoBehindTheMath:masterfrom
mjradwin:add-unit-test

Conversation

@mjradwin
Copy link

@mjradwin mjradwin commented Jun 6, 2024

I've added a small unit test to confirm that the NOAA sunrise/sunset calculator is working as expected

@mjradwin
Copy link
Author

mjradwin commented Mar 5, 2025

Hello @BehindTheMath is this repo still being kept up to date? I'm considering undertaking a full rewrite to use the new JS Temporal instead of depending on Luxon

@ShlomoCode
Copy link

@mjradwin It seems that Temporal is not yet available in Chrome nor Node.js
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#browser_compatibility

@mjradwin
Copy link
Author

mjradwin commented Mar 6, 2025

Yes, but we can use a polyfill.

https://www.npmjs.com/package/temporal-polyfill

@BehindTheMath
Copy link
Owner

@mjradwin I haven't been working on this repo much recently, but it's something I'd like to get back into.

I actually did some work to replace Luxon with the Temporal proposal around 3 years ago when it was starting to get some traction. If I remember correctly, I didn't like the API too much, which is why I never did anything with it.

However, now that it's definitely being added to the standard library, I suppose it makes sense to revisit that code. I opened #28 to track that.

I think it makes sense to wait until the adoption rate is higher to release it. Currently, no one would be able to use it without the polyfill, and stage 3 proposals are still subject to change.

@mjradwin
Copy link
Author

mjradwin commented Mar 7, 2025

That makes some sense. The polyfill is quite small (we are using it in production on Hebcal.com today) and the ZonedDateTime class can replace most of the uses of Luxon DateTime.

I also started some work on porting. May send a PR to #28 in the coming weeks

Purim sameach!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants