Skip to content

hebcal: round tzeit times, link candle to parsha, add MevarchimChodeshEvent - #32

Merged
mjradwin merged 1 commit into
mainfrom
claude/kosher-java-go-port-7tlx8k
Jul 8, 2026
Merged

hebcal: round tzeit times, link candle to parsha, add MevarchimChodeshEvent#32
mjradwin merged 1 commit into
mainfrom
claude/kosher-java-go-port-7tlx8k

Conversation

@mjradwin

@mjradwin mjradwin commented Jul 8, 2026

Copy link
Copy Markdown
Member

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

…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
@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

@mjradwin
mjradwin merged commit eb242aa into main Jul 8, 2026
6 checks passed
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
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.

2 participants