Message

A date MUST be formatted YYYY-MM-DD.

Context
cbc:IssueDate | cbc:DueDate | cbc:TaxPointDate | cbc:StartDate | cbc:EndDate | cbc:ActualDeliveryDate
Test
string-length(text()) = 10 and (string(.) castable as xs:date)
Usage
/ ubl:Invoice / cbc:IssueDate
/ ubl:Invoice / cbc:DueDate
/ ubl:Invoice / cac:InvoicePeriod / cbc:StartDate
/ ubl:Invoice / cac:InvoicePeriod / cbc:EndDate
/ ubl:Invoice / cac:BillingReference / cac:InvoiceDocumentReference / cbc:IssueDate
/ ubl:Invoice / cac:Delivery / cbc:ActualDeliveryDate
/ ubl:Invoice / cac:InvoiceLine / cac:InvoicePeriod / cbc:StartDate
/ ubl:Invoice / cac:InvoiceLine / cac:InvoicePeriod / cbc:EndDate