diff --git a/APPL/Shared/Shared.inc b/APPL/Shared/Shared.inc index 347e269ad4..315c557f82 100644 --- a/APPL/Shared/Shared.inc +++ b/APPL/Shared/Shared.inc @@ -1238,6 +1238,10 @@ var cache = { // Datum functies Date.prototype.toSQL = function toSQL(withTime) { + var year = this.getFullYear(); + if (year < 1000 || year > 9999) + shared.internal_error("Invalid year " + this.toLocaleString()); // Net iets minder erg dan ORA-01830 + var str = padout(this.getDate()) + "-" + padout(this.getMonth() + 1) + "-" + padout(this.getFullYear()) if (withTime) {