Description
Locate a supplied civil date on a seven-day grid anchored by an explicit reporting origin.
Public-health summaries depend on who is counted, which observations are verified, and the period and population used as the base. Shares, weighted contributions, and inventory balances describe supplied records; they do not by themselves establish a health outcome or a clinical recommendation.
Locate a supplied civil date on a seven-day grid anchored by an explicit reporting origin.
When to use this tool
Use it for reporting week date offset when the required inputs and conventions are already available.
How to use the tool and how it works
- Enter date, weekOrigin. Use the stated units and boundary conventions.
- Run the calculation. Correct any input error before interpreting a result.
- Read days, weekIndex, offsetDays. Inspect any known, defined, inclusion, or boundary flags before interpreting numeric values.
Parse date and weekOrigin as exact real YYYY-MM-DD calendar dates at UTC midnight. Divide their day difference into weekIndex=floor(days/7) and nonnegative offsetDays from zero through six.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| date | Date | Required. Text; maximum UTF-16 length 8192. |
| weekOrigin | Week Origin | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| days | Days | Required. Safe integer. |
| weekIndex | Signed zero-based seven-day block relative to weekOrigin; not an ISO week number. | Required. Safe integer. |
| offsetDays | Nonnegative day position from zero through six within that block. | Required. Safe integer. |
{
"input": {
"date": "2024-01-10",
"weekOrigin": "2024-01-01"
},
"output": {
"days": 9,
"weekIndex": 1,
"offsetDays": 2
}
} Limitations and assumptions
- A date before the origin can have a negative weekIndex. This is an origin-based week grid, not automatically an ISO week, epidemiological reporting calendar, or local-time convention.
- The field tables describe structural bounds; the mechanics also state cross-field requirements. Malformed input shapes, disallowed keys, and invalid domains cause input errors. Results must remain finite and within the declared output contract. A successful false flag or zero placeholder is distinct from an error.
- Numeric arithmetic uses binary floating point. Exact comparisons have no hidden tolerance or decimal rounding; negative zero is exported as zero. Decimal-text integer operations retain the exactness specifically stated above.
Alternative or Complementary methods
For reporting week date offset, check the source records and the supplied rule before comparing the result with another method. Use an appropriately validated measurement or analysis method for clinical interpretation.
References
Similar or alternative tools
- Coverage Population Cell Gap
Audit a supplied coverage count and reported fraction without choosing an eligibility definition.
- Health Outreach Household Person Base Gap
Compare household and person coverage without exchanging denominators.