You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The purpose of the pull request is to expose the existing @hebcal/core tachanun calculation in @hebcal/rest-api
I thought it would be useful if this was available so people who make use of this service can also know when tachanun is said. Here are some example outputs:
Diaspora, January 2, 2026 (2026-01-02, Friday before Shabbat):
Scope: add optional top-level tachanun field when options.tachanun is true and the response covers a single day
Test coverage: added formatter test for 2026-05-21
Thanks! I think there's also opportunity here to make the tachanun output more useful if you are open to it. Rather than just providing a boolean, it could also include a reason why tachanun is not said (eg, "chol hamoed"). For now I left this PR simple to just integrate with the existing functionality.
Do you want to attempt the change to @hebcal/core library (https://github.com/hebcal/hebcal-es6/blob/main/src/tachanun.ts) first to revise TachanunResult to add the tachanun reasons? To keep compatibility you'd want to keep the three existing boolean and then add additional string fields (or some enum if it makes more sense to do so)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The purpose of the pull request is to expose the existing
@hebcal/coretachanun calculation in@hebcal/rest-apiI thought it would be useful if this was available so people who make use of this service can also know when tachanun is said. Here are some example outputs:
Diaspora, January 2, 2026 (
2026-01-02, Friday before Shabbat):Diaspora, June 1, 2026 (
2026-06-01, ordinary weekday):Scope: add optional top-level
tachanunfield whenoptions.tachanunis true and the response covers a single dayTest coverage: added formatter test for
2026-05-21