Purpose
Represent a UTC instant at whole-second precision using decimal digits, with trailing default components omitted. This convention is intended for applications that explicitly agree to use it. It is not ISO 8601, and ordinary date parsers must not be expected to understand it.
Encoding
Start with YYYYMMDDhhmmss: a four-digit year followed by two-digit month, day, hour, minute and second, in that order. All digits are ASCII. Always interpret the instant in UTC using the proleptic Gregorian calendar.
Remove trailing components, one at a time, while they equal their defaults:
| Component | Default when omitted |
|---|---|
| Month | 01 |
| Day | 01 |
| Hour | 00 |
| Minute | 00 |
| Second | 00 |
The year is never omitted and remains exactly four digits. Only a suffix may be omitted. Stop as soon as the final remaining component differs from its default. The resulting shortest representation is the canonical encoding.
Decoding and validity
Accept a string of exactly 4, 6, 8, 10, 12 or 14 digits. Supply defaults for omitted trailing components. Leading zeros are required. A valid, non-shortest representation decodes to the same instant, but a canonical encoder must shorten it.
Years range from 0001 through 9999. Months range from 01 through 12. Days must exist in the specified month and year. Leap years are divisible by 4, except years divisible by 100 unless also divisible by 400. Hours range from 00 through 23; minutes and seconds from 00 through 59.
Reject invalid dates, extra digits, signs, separators, whitespace, fractional seconds, offsets and leap-second values. Never normalise an invalid date into a different date. This format does not represent reduced precision: 2026 means the exact instant 2026-01-01T00:00:00Z.
Examples and test vectors
| UTC instant | Canonical encoding |
|---|---|
| 2026-10-19T11:00:00Z | 2026101911 |
| 2026-10-19T00:00:00Z | 20261019 |
| 2026-10-01T00:00:00Z | 202610 |
| 2026-01-01T00:00:00Z | 2026 |
| 2026-01-01T00:00:01Z | 20260101000001 |
| 2024-02-29T23:59:59Z | 20240229235959 |
| 0001-01-01T00:00:00Z | 0001 |
20261019110000 is valid but noncanonical; canonicalise it to 2026101911.
Invalid inputs include 0000, 20260229, 19000229, 202613, 2026101924, 202610191160, 20261019115960, 20261, 2026-10-19 and 2026101911Z.
Tradeoffs
Whole-second precision only. The convention carries no timezone information because UTC is required. Compactness varies with the values: 2026-10-19T11:23:45Z still needs 14 digits. Encode as a string to preserve leading zeros and interoperability. Variable-length encoded strings must be decoded before chronological sorting; lexical sorting is not reliable across all accepted encodings. A schema or integration instruction must explicitly reference this definition.
Use in Spec Commons
The published_at field in the definition record uses this convention. It records publication time, without promising uniqueness or serving as a record identifier.