Description
Split one duration component's written fields.
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 one duration component's written fields.
When to use this tool
Use ISO Duration Fractional Component Token when checking a supplied date-label, duration or interval convention.
How to use the tool and how it works
- Enter token. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read whole, fraction, designator. Use the output convention below.
Split one duration component's written fields. Accept whole digits, optional decimal point/comma fraction and one Y/M/W/D/H/S designator; return whole/fraction as text and designator.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| token | Token | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| whole | Whole | Required. Text; maximum UTF-16 length 8192. |
| fraction | Dimensionless fraction on the stated basis; a value of 1 represents the whole reference amount. | Required. Text; maximum UTF-16 length 8192. |
| designator | Designator | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"token": "12.50S"
},
"output": {
"whole": "12",
"fraction": "50",
"designator": "S"
}
} Limitations and assumptions
- Without full P/T context, M is not resolved as month or minute; semantic ISO validity is not checked.
- 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.
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
- ISO Duration Week Only Token
Parse a bounded week-only duration token.
- Elapsed Duration Sign Canonicalization
Combine signed duration components and report overall sign.