Guth
NewsDocs
Page actions
View as Markdown ↗
Explore MCP tools ↗

instrument implementation / implementation-contract

Julian Date Converter implementation

A source-bound implementation contract for Julian Date Converter; deployment and executable qualification remain separate.

Status: VERIFIED_CLEANLifecycle: implementation-contract

Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

Record owner
Guth Instruments
Lifecycle
verified-clean
Evidence ID
t4-113
Effect
Computation or source lookup only

Input and validation requirements

  • Division by zero is not expected in the standard arithmetic, but malformed or non-finite numeric inputs can propagate NaN or infinity and must be rejected.
  • Invalid calendar dates, including 2023-02-29 and month 13, must be rejected rather than normalized silently.
  • Leap-second input such as 2016-12-31T23:59:60Z has undefined behavior unless explicitly rejected or modeled.
  • Floating-point precision can lose sub-second accuracy for large JD values when using ordinary JavaScript Number arithmetic.
  • Negative years, year zero, and dates before the Gregorian calendar reform require an explicit convention.
  • A JD numeric input must be distinguished from a calendar-date input; ambiguous numeric strings or local-time strings can cause incorrect conversions.
  • The inverse conversion must define behavior at the noon boundary, where JD integer values correspond to 12:00:00 rather than 00:00:00.

Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

{
  "inputs": {
    "calendar_date": "2000-01-01",
    "time": "12:00:00",
    "timezone": "UTC"
  },
  "expected_outputs": {
    "JD": 2451545,
    "MJD": 51544.5,
    "calendar_date": "2000-01-01T12:00:00Z"
  },
  "working": "Use a=floor((14-M)/12)=floor(13/12)=1; y=Y+4800-a=2000+4800-1=6799; m=M+12a-3=1+12-3=10. JDN=D+floor((153m+2)/5)+365y+floor(y/4)-floor(y/100)+floor(y/400)-32045 = 1+floor(1532/5)+365(6799)+floor(6799/4)-floor(6799/100)+floor(6799/400)-32045 = 1+306+2481635+1699-67+16-32045 = 2451545. Fraction of day = (12*3600)/86400 = 0.5. JD = JDN - 0.5 + 0.5 = 2451545.0. MJD = 2451545.0 - 2400000.5 = 51544.5."
}

Other records

Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

  • VERIFIED_LEDGER.json
  • evidence-tranche4/tranche4-results.json