Skip to content

Main content

Sleep Entry Clock Reference Pair Tool

Use explicit serial local minute coordinates across a sleep interval; offsets establish elapsed time without a time-zone lookup.

Loading tool…

Description

Return localEnd-localStart, endOffset-startOffset, and local duration minus offset change as elapsedMinutes.

Personal health logs distinguish clock coordinates, elapsed durations, pauses, and missing time metadata. A supplied time comparison organizes records without measuring an activity or assessing its health effects.

Return localEnd-localStart, endOffset-startOffset, and local duration minus offset change as elapsedMinutes.

When to use this tool

Use Sleep Entry Clock Reference Pair when you need one explicit diary-duration or clock-accounting component.

How to use the tool and how it works

  1. Enter localStart, localEnd, startOffset, endOffset. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read localMinutes, elapsedMinutes, offsetChange. Use the output convention below.

Require startOffset and endOffset within -1439 to 1439 minutes. Return localEnd-localStart, endOffset-startOffset, and local duration minus offset change as elapsedMinutes.1

Input fieldMeaning and unitsAccepted input
localStartLocal StartRequired. Safe integer.
localEndLocal EndRequired. Safe integer.
startOffsetStart local-minus-reference offset in minutes.Required. Safe integer; minimum -1439; maximum 1439.
endOffsetEnd local-minus-reference offset in minutes.Required. Safe integer; minimum -1439; maximum 1439.
Output fieldInterpretationReturned shape
localMinutesLocal MinutesRequired. Safe integer.
elapsedMinutesElapsed MinutesRequired. Safe integer.
offsetChangeOffset ChangeRequired. Safe integer.
json
{
  "input": {
    "localStart": 1320,
    "localEnd": 1800,
    "startOffset": 120,
    "endOffset": 60
  },
  "output": {
    "localMinutes": 480,
    "elapsedMinutes": 540,
    "offsetChange": -60
  }
}

Limitations and assumptions

  • Offsets use local-minus-reference convention and local endpoints share a continuous minute coordinate; no timezone or daylight-saving rule is inferred and signed durations are retained.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Retain dates and offset information and consult an appropriate professional for questions about health, care, or suitable activity.

References

  1. Calculation and input contract: health/sleep-entry-clock-reference-pair — tool.io

Similar or alternative tools