FSN#35327 Kleine range-check op jaar bij de date.toSQL

svn path=/Website/trunk/; revision=28409
This commit is contained in:
Jos Groot Lipman
2016-03-09 12:42:43 +00:00
parent ae80f841c7
commit a80a03a99f

View File

@@ -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)
{