Description
Count completed days backwards through a supplied allowance of missed grace days.
Personal health logs distinguish observed events, unknown entries, device/source identifiers and chosen day or streak boundaries. A numerical activity duration or recorded symptom label organizes supplied data rather than diagnosing a condition. Fixed 86400-second days differ from civil days affected by timezone and daylight-saving changes.
Count completed days backwards through a supplied allowance of missed grace days.
When to use this tool
Use Personal Health Streak Grace Day when checking the stated personal-log, missingness, time or streak convention.
How to use the tool and how it works
- Enter completedDays, graceDayBudget. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read currentStreak, graceDaysUsed. Use the output convention below.
Require whole graceDayBudget>=0. Scan completedDays backward; count true entries, allow up to the budget of false entries, and stop at the next false. Return completed-day count and grace days used separately.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| completedDays | Completed Days | Required. Array of boolean; maximum items 256. |
| graceDayBudget | Grace Day Budget | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| currentStreak | Completed true days counted during the backward scan, excluding allowed false grace days. | Required. Safe integer. |
| graceDaysUsed | False days consumed within the supplied budget before the terminating break. | Required. Safe integer. |
{
"input": {
"completedDays": [
true,
false,
true,
false,
true
],
"graceDayBudget": 1
},
"output": {
"currentStreak": 2,
"graceDaysUsed": 1
}
} Limitations and assumptions
- Grace days do not increase currentStreak; they need not be consecutive and the list's chronology and health goals are supplied rather than evaluated.
- 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
Review original records and calibrated devices; consult qualified health professionals for symptoms, interpretation or actual care decisions.
References
Similar or alternative tools
- Symptom Diary Unknown Versus Absent
Distinguish an unknown symptom entry from a known present or absent entry.
- Home Health Entry Correction Marker
Link a corrected personal-health entry to its correction marker.