Skip to content

Main content

GS1 AI Date Day Zero Policy Tool

Calculate gs1 ai date day zero policy from explicit caller-supplied inputs.

Loading tool…

Description

Validate a supplied-century YYMMDD token and optionally interpret day 00 as the final day of its month.

Identifier validation can involve several distinct questions: whether text has the expected shape, whether a checksum is consistent, and whether an authority actually assigned the identifier. Formatting and field extraction address narrower questions. Each result must be read according to the particular property the tool checks.

Validate a supplied-century YYMMDD token and optionally interpret day 00 as the final day of its month.

When to use this tool

Use GS1 AI Date Day Zero Policy when you need the particular shape, formatting, field, or checksum property as one explicit stage in an identifier workflow.

How to use the tool and how it works

  1. Enter token, allowDayZero, century. 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 valid, year, month, day, lastDayOfMonth. Inspect valid, lastDayOfMonth before interpreting the associated values.

Require century from zero through 99 and parse token as YYMMDD. Build year=century*100+YY, validate month and Gregorian day limits, and when allowDayZero admit day 00 and substitute the month's final day while setting lastDayOfMonth true.1

Input fieldMeaning and unitsAccepted input
tokenTokenRequired. Text; maximum UTF-16 length 8192.
allowDayZeroAllow Day ZeroRequired. Boolean.
centuryExplicit integer century, multiplied by 100 before the two-digit year is added.Required. Safe integer; minimum 0; maximum 99.
Output fieldInterpretationReturned shape
validWhether this tool’s particular check passes; does not imply broader identifier or protocol validity.Required. Boolean.
yearYearRequired. Safe integer.
monthMonthRequired. Safe integer.
dayDayRequired. Safe integer.
lastDayOfMonthWhether the input used day 00, not whether any explicit date happens to be month end.Required. Boolean.
json
{
  "input": {
    "token": "260200",
    "allowDayZero": true,
    "century": 20
  },
  "output": {
    "valid": true,
    "year": 2026,
    "month": 2,
    "day": 28,
    "lastDayOfMonth": true
  }
}

Limitations and assumptions

  • The century and day-zero policy are explicit inputs, not inferred GS1 application-identifier rules. Malformed shape returns zero fields; later validity failures can preserve parsed fields, so read valid before using a date.
  • The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.

Alternative or Complementary methods

Use a complete format and checksum validator when required, then consult the issuing registry or verification process for assignment and identity. Preserve meaningful leading zeros as text.

References

  1. Calculation and input contract: validate/gs1-ai-date-day-zero-policy — tool.io

Similar or alternative tools