HDATE_JULIAN Function (Gnumeric)
Calculate a Julian day number from explicit Gregorian components in Gnumeric and distinguish optional current-date defaults from reproducible inputs.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =HDATE_JULIAN(2000,1,1) has independent reference result 2451545. Its three components are a Gregorian year, month and day, despite the function being in the Hebrew-date plugin.
Availability and evidence
- Introduction: Gnumeric 1.9.15. The official 1.9.14-to-1.9.15 source diff adds the Hebrew-date plugin and the exact hdate_julian registration. This is introduction evidence, not a native test.
- Source support: Registered in the Gnumeric 1.12.62 plugin. No retirement is established. The last functioning application version is unverified for this guide.
- Evidence dates: Gnumeric 1.12.62 source was retained October 13–14, 2026 and reviewed October 15. Historical introduction evidence, GOffice 0.10.61 source and the calendar reference were retrieved October 15 where cited. Independent calendar or exact-rational calculations are labeled reference results; no native Gnumeric, headless application or GUI execution was performed.
Syntax and optional components
=HDATE_JULIAN([year],[month],[day])
The current source registers all three arguments as optional numeric values. Each omitted component is taken independently from the current system date: a missing year uses the current year, a missing month the current month, and a missing day the current day. This is not the same as saying omitted month or day defaults to 1.
For example, if the hypothetical current date is October 15, 2026, =HDATE_JULIAN() represents October 15, 2026; =HDATE_JULIAN(2024) represents October 15, 2024; and =HDATE_JULIAN(2024,2) represents February 15, 2024. These are simulated default selections, not observations of a live workbook clock. Use all three arguments for reproducible calculations.
The function converts its numeric components to integers using Gnumeric’s integer conversion before calling the day-number routine. Use exact integer components and four-digit years. There is no DATE-style 1900/2000 expansion of a small year in this callback, so 26 should not be used as shorthand for 2026.
What the returned integer means
The U.S. Naval Observatory’s conversion reference describes Julian dates as a noon-based count and supplies the same integer conversion family. This function returns the integer associated with the given Gregorian calendar date. For January 1, 2000 that integer is 2451545; a continuous astronomical JD at midnight on that date is half a day smaller.
The result is not a Hebrew date, an ordinary spreadsheet date serial, a Unix timestamp, or a year-plus-day-of-year code. It has no time-of-day argument. Do not append an observation time without separately defining a continuous-JD convention and time scale.
Reproducible component worksheet
Create GregorianParts with Year, Month, Day and Julian_number in A1:D1. Enter triples (1970,1,1), (2000,1,1), (2001,3,30), (2024,2,29) and (2026,1,1) in rows 2:6. Put =HDATE_JULIAN(A2,B2,C2) in D2 and fill down. Expected integers are 2440588,2451545,2451999,2460370,2461042.
In E2 enter =DATE(A2,B2,C2) and in F2 enter =DATE2JULIAN(E2); fill down. For these explicitly valid modern Gregorian dates, D and F have the same independently calculated integers. E should have a date format, while D and F should have ordinary integer formats. The cross-check compares two input paths to the same Julian converter, not two independently executed spreadsheet engines.
Reference controls
| Formula | Independent reference result |
|---|---|
=HDATE_JULIAN(1970,1,1) |
2440588 |
=HDATE_JULIAN(2000,1,1) |
2451545 |
=HDATE_JULIAN(2001,3,30) |
2451999 |
=HDATE_JULIAN(2024,2,28) |
2460369 |
=HDATE_JULIAN(2024,2,29) |
2460370 |
=HDATE_JULIAN(2024,3,1) |
2460371 |
=HDATE_JULIAN(2026,1,1) |
2461042 |
=HDATE_JULIAN(2026,2,1) |
2461073 |
=HDATE_JULIAN(2026,10,15) |
2461329 |
The valid-date results were independently reconciled with calendar ordinals and a separately arranged Gregorian conversion. No malformed month/day or integer-overflow input was executed or modeled as an acceptable calendar date.
Advanced: leap-day and input-origin checks
Use (2024,2,28) and (2024,3,1) in two rows. Their day-number difference is 2. Change both years to 2023, keeping month/day fixed: the difference becomes 1. This tests a real calendar distinction, rather than subtracting displayed day numbers within a month.
For a reproducibility control, compare the explicit =HDATE_JULIAN(2026,10,15) with a no-argument form on a worksheet whose recorded evaluation date is October 15, 2026. The expected calendar number for the explicit input is 2461329. On a hypothetical next-day evaluation the no-argument form would select October 16 and move by one, while the explicit form remains fixed. This is a source-rule simulation; actual volatility, timezone choice and saved-result refresh are unverified.
Validation belongs before the converter
The component helper and integer converter do not perform a complete Gregorian date-validity check in this path. Supplying February 31 or month 13 is therefore not a documented way to request a safe validation error. Arithmetic output from malformed components would not prove that the original date was valid. Restrict inputs to actual Gregorian dates and validate them separately rather than silently relying on normalization.
Partial defaults can even create an invalid combination: on a hypothetical day 31, supplying only a February year/month leaves day 31 from the clock. This is why the guide recommends complete explicit components. The source’s permissive arithmetic should not be confused with DATE’s own normalization behavior.
Errors and operational limits
The callback returns the converter’s integer rather than a dedicated invalid-date diagnostic. Numeric parsing and argument errors can still arise before it is called, but exact locale, text, blank-cell and array behavior is unverified. Very large years can exceed integer arithmetic limits and are outside the supported examples; they were not tested.
The registration is volatile, including when all arguments are present. This is source metadata, not a claim about observed recalculation frequency. Historical calendar adoption, negative years, file export and plugin activation remain separate checks. Preserve the underscore in the function name; the page’s hyphenated URL does not change the worksheet spelling.