Contact

HDATE_MONTH Function (Gnumeric)

Date & Time Beginner Gnumeric

Convert Gregorian year, month, and day components to Gnumeric's zero-based Hebrew month index, with Tishrei and leap-month numbering explained.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

HDATE_MONTH converts Gregorian year, month and day components and returns Gnumeric’s Hebrew month index. The result is a number from the library’s month table, not a Gregorian month number and not the familiar one-based month numbering used by every other Hebrew-calendar API. Keep the numbering convention explicit when exporting it.

Syntax and defaults

=HDATE_MONTH([year],[month],[day])

Each optional argument supplies a Gregorian component. Missing components default independently to the current year, month or day in the running environment. Thus supplying only a year does not mean January1 of that year. For stable calculations, provide all three components explicitly.

The official helper header documents zero-based month indices 0–13: index 0 is Tishrei, while 12 and 13 represent Adar I and Adar II. The callback returns its helper’s hmonth directly, without adding one. Do not automatically add one and claim that the result is a universal Hebrew month number; different conventions begin the year at different months and handle leap months differently.

Reproducible new-year fixture

=HDATE_MONTH(2024,10,3) has expected result 0. Independently, October 3, 2024 is1 Tishrei 5785 before sunset, as confirmed by Hebcal. The Gnumeric source’s documented mapping assigns Tishrei index 0. This combines an external calendar check with a first-party numbering check rather than guessing a month from its name.

For a worksheet, put 2024 in A2,10 in B2 and3 in C2. =HDATE_MONTH(A2,B2,C2) returns the month index. Label the result “Gnumeric Hebrew month index” so a zero is not mistaken for a missing value or an error. Keep the original Gregorian components for auditability.

Advanced use: labels and grouping

If you need a human-readable month name, use a deliberately verified lookup table for this exact numbering scheme or a Hebrew-date text function. Do not feed the returned index to a Gregorian MONTHNAME-style construction. Grouping records by this index alone also loses the Hebrew year; dates in different years can share the same month index.

Leap-month indices need explicit handling in reporting. A fixed twelve-entry label list can silently mislabel values 12 or13. This guide verifies the Tishrei control and the documented special indices; it does not claim a native test of every month in every leap-year pattern.

Errors and practical limits

The conversion helper can return #VALUE! for rejected components. The component interface converts numeric arguments to integers, so avoid fractional dates and supply real Gregorian components. Current-component defaults make omitted arguments environment-dependent and unsuitable for a frozen report.

The function has no sunset, location or time-zone argument. Date-only conversion is insufficient for deciding a sunset-sensitive observance boundary. Validate such decisions using a suitable calendar and local context.

The official 1.9.15 source explicitly registers HDATE_MONTH, and NEWS records addition of the Hebrew-date function group in 1.9.15. Together these establish its documented 1.9.15 introduction. NEWS records later HDATE-family fixes in 1.10.8; those are a separate maintenance milestone. The scoped source is retained 1.12.62 plus the freshly retrieved official 1.12.57 helper header; the native fixture is1.12.57. Last functioning release is unknown.

Native verification

Gnumeric ssconvert 1.12.57 returned exactly 0 for HDATE_MONTH(2024,10,3), matching the independently checked calendar date and documented zero-based mapping.