Description
Split a nonnegative day count into whole fiscal weeks and remainder.
Date labels and intervals depend on origins, endpoint inclusion and calendar versus elapsed-time conventions. Numeric serial periods and local token formats can represent useful bookkeeping without resolving a real instant or official fiscal rule.
Split a nonnegative day count into whole fiscal weeks and remainder.
When to use this tool
Use Fiscal Week Extra Day Remainder when checking a supplied date-label, duration or interval convention.
How to use the tool and how it works
- Enter days, weekLength. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read wholeWeeks, extraDays. Use the output convention below.
Split a nonnegative day count into whole fiscal weeks and remainder. Require whole days >= 0 and weekLength >= 1; return floor(days/weekLength) and days modulo weekLength.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| days | Days | Required. Safe integer; minimum 0. |
| weekLength | Week Length | Required. Safe integer; minimum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| wholeWeeks | Whole Weeks | Required. Safe integer. |
| extraDays | Extra Days | Required. Safe integer. |
{
"input": {
"days": 365,
"weekLength": 7
},
"output": {
"wholeWeeks": 52,
"extraDays": 1
}
} Limitations and assumptions
- The week length is supplied and need not be seven; no fiscal calendar is selected.
- 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
Use a complete date/time implementation and the applicable calendar policy for actual scheduling and interval interpretation.
References
Similar or alternative tools
- Fiscal Week Closure Policy Token
Assign a simplified fiscal-week closure label.
- Fiscal Period Label Explicit Start Month
Return fiscal start year and period from an explicit start month.