SchemaGuard by Ironbark Digital · EN 16931 / Peppol / XRechnung Reference
← All 294 EN 16931 / Peppol Rules & Live Validator
FATAL ATW Library Diagnostic BT/BG Fields: BT-2

ATW-DATE-NOT-A-CALENDAR-DATE — E-Invoice Validation Rule & Fix

Fixture ID: badDate · XPath: /ubl:Invoice/cbc:IssueDate

1. Why This Rule Triggers (Diagnostic Message)

The invoice issue date (BT-2) is "09.08.2026", which is not a calendar date. UBL types this element as xs:date, so the only accepted form is a zero-padded YYYY-MM-DD naming a day that actually exists: "31.07.2026" and "07/31/2026" fail on syntax, and "2026-02-30", "2026-13-01" and "2025-02-29" fail because no such day is on the calendar. Core EN 16931 has no BR-* rule for it because the XML schema already forbids it — which is exactly why it is worth catching here. Left alone, this value passes every business rule, is written into the document verbatim, and the document is then rejected by schema validation before any validator reaches the business rules at all.

2. How to Fix ATW-DATE-NOT-A-CALENDAR-DATE

Set issueDate to an ISO 8601 calendar date — four-digit year, two-digit month, two-digit day, separated by hyphens, with no time part and no timezone. If you are formatting a JavaScript Date, note that toISOString() appends a time part that must be trimmed, and that it converts to UTC first, which can move the date by a day.

3. Valid Code / Payload Example

"issueDate": "2026-07-31"
Test & Validate XML / JSON in Live SchemaGuard Validator →