Skip to content

Main content

ISO 8601 Unknown Component Mask Tool

Compute iso 8601 unknown component mask from explicit bounded inputs.

Loading tool…

Description

Inspect known components in a restricted partial-date spelling.

Timestamp notation distinguishes written precision, quantization and carry into the next larger field. Padding a fraction, rounding it and propagating an end-of-day marker are different operations and do not establish clock accuracy.

Inspect known components in a restricted partial-date spelling.

When to use this tool

Use ISO 8601 Unknown Component Mask when checking one explicit timestamp precision, rounding or carry convention.

How to use the tool and how it works

  1. Enter date. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read yearKnown, monthKnown, dayKnown. Inspect yearKnown, monthKnown, dayKnown before interpreting the associated values.

Inspect known components in a restricted partial-date spelling. Accept four digits or XXXX for year and two digits or XX for month/day; return three presence flags.1

Input fieldMeaning and unitsAccepted input
dateRestricted component-mask spelling only; numeric month/day fields are not validated as a real date.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
yearKnownYear KnownRequired. Boolean.
monthKnownMonth KnownRequired. Boolean.
dayKnownDay KnownRequired. Boolean.
json
{
  "input": {
    "date": "2024-XX-XX"
  },
  "output": {
    "yearKnown": true,
    "monthKnown": false,
    "dayKnown": false
  }
}

Limitations and assumptions

  • Numeric month/day validity and real date existence are not checked; this is not complete ISO/EDTF validation.
  • 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 complete date-time arithmetic when a carry must change a date or interact with timezone transitions.

References

  1. Calculation and input contract: date/iso8601-unknown-component-mask — tool.io

Similar or alternative tools