datetime/diff

Duration between two dates or datetimes, as totals and a calendar breakdown.

Free / no pricing configured

What it does

Returns the time between start and end as both elapsed totals (seconds, minutes, hours, days, weeks) and a calendar breakdown (years, months, days, hours, minutes, seconds), plus the direction.

Primary use cases

  • Computing an age or tenure from a birth/start date (use the calendar breakdown's years).
  • Measuring elapsed time or a countdown between two timestamps.
  • "How long until / how long since" questions.

Good to know

Accepts YYYY-MM-DD or full ISO 8601. end defaults to today. Times without an offset are treated as UTC. Computed locally.

Parameters

endstringoptional

End date or datetime (YYYY-MM-DD or ISO 8601). Defaults to today.

startstringrequired

Start date or datetime (YYYY-MM-DD or ISO 8601).

datetime/diff — Faro