hebcal: round tzeit times, link candle to parsha, add MevarchimChodeshEvent - #32
Merged
Merged
Conversation
…hEvent
Three related fidelity fixes bringing the candle/havdalah/mevarchim
output in line with @hebcal/core:
- Round degree-based tzeit times (Havdalah, fast begin/end, chametz) to
the nearest minute in NewTimedEvent, matching @hebcal/core's
TimedEvent constructor (this.eventTime = Zmanim.roundTime(...)).
Fixed-offset candle-lighting/Havdalah are unaffected (SunsetOffset
already yields whole minutes and floors candle-lighting, which is
correct — the ~1 min differences seen elsewhere are the inherent
noaa-go vs @hebcal/core solar delta, not rounding). The ZMANIM
daily-times feature has no @hebcal/core equivalent and is left as-is.
- Link erev-Shabbat candle-lighting to the upcoming week's parsha
(TimedEvent.LinkedEvent), so consumers can render "Parashat X" as the
candle memo without recomputing the sedra.
- Replace the bare "Shabbat Mevarchim Chodesh" HolidayEvent with a
MevarchimChodeshEvent that carries the molad of the upcoming month and
provides Render/RenderBrief (dropping the leading "Shabbat" word) and
GetCategories. The molad announcement's time-of-day format is
locale/location dependent, so it is left for the caller to render from
the exposed Molad rather than baked into a single string.
Candle-lighting/fast test values updated to the rounded results, verified
against @hebcal/core.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmSgHoAWaHsVFU7bLLUXzJ
|
mjradwin
added a commit
to hebcal/hebcal
that referenced
this pull request
Jul 8, 2026
* event: add GetCategories to CalEvent in hebcal/hebcal-go#31 * hebcal: round tzeit times, link candle to parsha, add MevarchimChodeshEvent in hebcal/hebcal-go#32 * event: align English molad memo format with @hebcal/core in hebcal/hebcal-go#33 * zmanim: compute sofZmanMGA from sea-level sunrise/sunset in hebcal/hebcal-go#30 * Add zmanim for the JSON API + IsAssurBemlacha in hebcal/hebcal-go#29
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Three related fidelity fixes bringing the candle/havdalah/mevarchim output in line with @hebcal/core:
Round degree-based tzeit times (Havdalah, fast begin/end, chametz) to the nearest minute in NewTimedEvent, matching @hebcal/core's TimedEvent constructor (this.eventTime = Zmanim.roundTime(...)). Fixed-offset candle-lighting/Havdalah are unaffected (SunsetOffset already yields whole minutes and floors candle-lighting, which is correct — the ~1 min differences seen elsewhere are the inherent noaa-go vs @hebcal/core solar delta, not rounding). The ZMANIM daily-times feature has no @hebcal/core equivalent and is left as-is.
Link erev-Shabbat candle-lighting to the upcoming week's parsha (TimedEvent.LinkedEvent), so consumers can render "Parashat X" as the candle memo without recomputing the sedra.
Replace the bare "Shabbat Mevarchim Chodesh" HolidayEvent with a MevarchimChodeshEvent that carries the molad of the upcoming month and provides Render/RenderBrief (dropping the leading "Shabbat" word) and GetCategories. The molad announcement's time-of-day format is locale/location dependent, so it is left for the caller to render from the exposed Molad rather than baked into a single string.
Candle-lighting/fast test values updated to the rounded results, verified against @hebcal/core.
Claude-Session: https://claude.ai/code/session_01CmSgHoAWaHsVFU7bLLUXzJ