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

instrument implementation / implementation-contract

Date & Duration Calculator implementation

A source-bound implementation contract for Date & Duration Calculator; 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-291
Effect
Computation or source lookup only

Input and validation requirements

The specification leaves invalid-date behavior and duration conventions unspecified. The invalid 2023-02-29 input must be rejected, and reversed dates must have an explicitly defined signed-versus-absolute and inclusive-versus-exclusive convention; otherwise different plausible implementations produce different results.

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": {
    "mode": "duration",
    "start_date": "2024-01-15",
    "end_date": "2024-03-20"
  },
  "expected_outputs": {
    "total_days": 65,
    "calendar_years": 0,
    "calendar_months": 2,
    "calendar_days": 5,
    "whole_weeks": 9,
    "remaining_days": 2,
    "end_day_of_week": "Wednesday"
  },
  "working": "Add 2 calendar months: 2024-01-15 -> 2024-03-15. Count remaining days: 2024-03-15 -> 2024-03-20 = 5 days. Total days: Jan 15 -> Mar 15 = 31 + 29 - 15 = 45 days; 45 + 5 = 50? Correction: Jan 15 -> Feb 15 = 31 days, Feb 15 -> Mar 15 = 29 days, and Mar 15 -> Mar 20 = 5 days, so calendar-component arithmetic gives 2 months and 5 days, while elapsed total days is 31 + 29 + 5 = 65 days. Weeks: 65 = (9 x 7) + 2, so 9 whole weeks and 2 remaining days. March 20, 2024 is Wednesday."
}

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