Skip to content

Time Difference API

POST https://api.findutils.com/api/tools/time-difference/execute

Work out how long there is between two times of day, with no dates involved. Handles a shift that crosses midnight — 22:00 to 06:00 is eight hours, not minus sixteen — and can subtract an unpaid break. Accepts 24-hour times and am/pm, and returns the duration both as hours and minutes and as decimal hours for invoicing.

Request body

application/json
  • start

    string required

    Start time: "09:00", "9:00:30" or "9:00 am".

  • end

    string required

    End time, same formats. "24:00" means the end of the day.

  • overnight

    string optional

    auto wraps past midnight only when the end is not after the start. always puts the end on the NEXT day, so 09:00 to 17:00 becomes 32 hours. never refuses to wrap and errors instead. Default: auto. One of auto · always · never. Default "auto".

  • break_minutes

    number optional

    Unpaid break to subtract, in minutes. Default: 0. Default 0.

Example arguments

Verified
{
  "start": "22:00",
  "end": "06:00"
}