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
/ ubl:CreditNote / cbc:IssueDate
/ ubl:CreditNote / cac:InvoicePeriod / cbc:StartDate
/ ubl:CreditNote / cac:InvoicePeriod / cbc:EndDate
/ ubl:CreditNote / cac:BillingReference / cac:InvoiceDocumentReference / cbc:IssueDate
/ ubl:CreditNote / cac:Delivery / cbc:ActualDeliveryDate
/ ubl:CreditNote / cac:PaymentMeans / cbc:PaymentDueDate
/ ubl:CreditNote / cac:CreditNoteLine / cac:InvoicePeriod / cbc:StartDate
/ ubl:CreditNote / cac:CreditNoteLine / cac:InvoicePeriod / cbc:EndDate