Description
Format a signed proleptic year with minimum digit width.
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.
Format a signed proleptic year with minimum digit width.
When to use this tool
Use Proleptic Year Signed Padding when checking a supplied date-label, duration or interval convention.
How to use the tool and how it works
- Enter year, width. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read text. Use the output convention below.
Format a signed proleptic year with minimum digit width. Require width in [1,20]; prepend minus for negative year, otherwise plus, then pad the absolute year's spelling.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| year | Year | Required. Safe integer. |
| width | Minimum magnitude padding width; longer years are retained rather than truncated. | Required. Safe integer; minimum 1; maximum 20. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| text | Text | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"year": -44,
"width": 4
},
"output": {
"text": "-0044"
}
} Limitations and assumptions
- Width does not truncate longer years; this is a formatter, not validation of an ISO date or era convention.
- 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
- Date: Signed Day Offset Label
Label the sign of a bounded whole day offset.
- Civil Date Year Two Digit Window
Return two-digit year text and explicit-window membership.