kewisch / sepa.js

Create and validate SEPA XML transactions
http://kewisch.github.io/sepa.js
Other
88 stars 61 forks source link

Wrong format in CreationDate #40

Closed OriolRF closed 3 years ago

OriolRF commented 4 years ago

Hi,

for Direct Debit documents (at least), the format for the creation date field should be 19 char long, according to the definition, but the result is 24 char, thus causing errors in bank validators.

This has an easy fix: line 193 of sepa.js should be r(grpHdr, 'CreDtTm', this.created.toISOString().substr(0,19))