Description
Format a supplied civil month with either a validated day or an unknown-day mask.
Date formats distinguish calendar years from ISO week-years, known day precision from unknown-day masks, and midnight at the start versus end of a day. A fixed 86400-second day fraction does not encode civil timezone transitions. Partial-date wording preserves uncertainty rather than silently choosing a date.
Format a supplied civil month with either a validated day or an unknown-day mask.
When to use this tool
Use End Of Month Unknown Day Mask when you already have year, month, dayKnown, suppliedDay and need to format a supplied civil month with either a validated day or an unknown-day mask.
How to use the tool and how it works
- Enter year, month, dayKnown, suppliedDay. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read dateText, precision. Use the output convention below.
Require year 0..9999 and month 1..12. When dayKnown=true require a real day in that month; otherwise suppliedDay must be exactly zero. Return YYYY-MM-DD or the literal YYYY-MM-?? mask with day/month precision.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| year | Year | Required. Safe integer; minimum 0; maximum 9999. |
| month | Month | Required. Safe integer; minimum 1; maximum 12. |
| dayKnown | Day Known | Required. Boolean. |
| suppliedDay | Real month day when dayKnown=true; exactly zero sentinel when unknown. | Required. Safe integer; minimum 0; maximum 31. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| dateText | YYYY-MM-DD or literal YYYY-MM-??; unknown day is preserved rather than imputed to month end. | Required. Text; maximum UTF-16 length 8192. |
| precision | Precision | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"year": 2024,
"month": 2,
"dayKnown": false,
"suppliedDay": 0
},
"output": {
"dateText": "2024-02-??",
"precision": "month"
}
} Limitations and assumptions
- Unknown means no day is supplied; the tool does not infer the end of the month, choose an imputed date or return a parseable full date for month precision.
- 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 calendar/timezone conversion when relating week dates, timestamps or local schedules. Preserve unknown precision explicitly and choose an endpoint policy before calculation; a formatter or fixed-day fraction does not resolve missing dates or civil-time rules.
References
Similar or alternative tools
- ISO Week Date Field Formatter
Format valid supplied ISO week-year, week and weekday fields.
- Historical Date Circa Qualifier Token
Add a circa marker to supplied historical-date wording.