Description
Subtract suppliedDayStart from recordedTime, divide by positive suppliedDayLength with floor for dayIndex, and return a nonnegative withinDay remainder.
Calendar coordinates depend on an era, origin, day-start rule, and sometimes an arithmetic rather than observational convention. A supplied coordinate difference does not resolve those choices.
Subtract suppliedDayStart from recordedTime, divide by positive suppliedDayLength with floor for dayIndex, and return a nonnegative withinDay remainder.
When to use this tool
Use Public Calendar Day Start Offset when you need a documented calendar convention or source-coordinate comparison.
How to use the tool and how it works
- Enter recordedTime, suppliedDayStart, suppliedDayLength. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read dayIndex, withinDay. Use the output convention below.
Subtract suppliedDayStart from recordedTime, divide by positive suppliedDayLength with floor for dayIndex, and return a nonnegative withinDay remainder.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| recordedTime | Recorded Time | Required. Finite number. |
| suppliedDayStart | Supplied Day Start | Required. Finite number. |
| suppliedDayLength | Supplied Day Length | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| dayIndex | Day Index | Required. Safe integer. |
| withinDay | Within Day | Required. Finite number. |
{
"input": {
"recordedTime": 30,
"suppliedDayStart": 6,
"suppliedDayLength": 24
},
"output": {
"dayIndex": 1,
"withinDay": 0
}
} Limitations and assumptions
- Origin and day length are supplied in compatible units; sunset, timezone changes, and astronomical timing are not calculated.
- 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
Consult the source calendar and authoritative date information for actual observance, conversion, or historical dating.
References
Similar or alternative tools
- Public Hijri Month Source Gap
Use exact integers for (secondYear - firstYear) × monthsInSuppliedYear + secondMonth - firstMonth.
- Hijri Source Month Boundary Gap
Subtract firstSourceEndDay from secondSourceStartDay and subtract one more unless sharedBoundaryDay is true.