Attestwire › Rule reference › PEPPOL-EN16931-F001
PEPPOL-EN16931-F001 Peppol requires every date to be a real YYYY-MM-DD date
noun · Peppol BIS · fatal · BT-2
For a sample invoice, the library reports: The invoice issue date (BT-2) is "2026-02-30", which is not a calendar date.
- Business term
BT-2- Severity
fatal
The fix
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.
A passing value
"issueDate": "2026-07-31"What the library returns
The full error returned by @attestwire/en16931. It includes the rule ID,
affected field and suggested correction. Developers can use this object in their application:
{
"rule": "PEPPOL-EN16931-F001",
"field": "BT-2",
"severity": "fatal",
"message": "The invoice issue date (BT-2) is \"2026-02-30\", 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. Peppol states this as PEPPOL-EN16931-F001 (\"A date MUST be formatted YYYY-MM-DD\"), which tests both the ten-character length and that the value is castable as xs:date.",
"fix": "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.",
"example": "\"issueDate\": \"2026-07-31\"",
"xpath": "/ubl:Invoice/cbc:IssueDate",
"docsUrl": "https://attestwire.com/rules/PEPPOL-EN16931-F001"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.