X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/22faee923071966f24b041c703aca282cb707fc0..fdebfd5d0c558cb156849b01c9c9268b29dc443b:/js/kivi.js?ds=inline diff --git a/js/kivi.js b/js/kivi.js index 43e3718c2..3ee73a708 100644 --- a/js/kivi.js +++ b/js/kivi.js @@ -37,7 +37,7 @@ namespace("kivi", function(ns) { if (date === '') return null; - if (date === '0') + if (date === '0' || date === '00') return new Date(); var parts = date.replace(/\s+/g, "").split(ns._date_format.sep); @@ -75,14 +75,14 @@ namespace("kivi", function(ns) { } date = new Date( year, - (parts[ ns._date_format.m ] || 0) * 1 - 1, // Months are 0-based. - (parts[ ns._date_format.d ] || 0) * 1 + (parts[ ns._date_format.m ] || (today.getMonth() + 1)) * 1 - 1, // Months are 0-based. + (parts[ ns._date_format.d ] || today.getDate()) * 1 ); } else if (parts.length == 2) { date = new Date( (new Date()).getFullYear(), - (parts[ (ns._date_format.m > ns._date_format.d) * 1 ] || 0) * 1 - 1, // Months are 0-based. - (parts[ (ns._date_format.d > ns._date_format.m) * 1 ] || 0) * 1 + (parts[ (ns._date_format.m > ns._date_format.d) * 1 ] || (today.getMonth() + 1)) * 1 - 1, // Months are 0-based. + (parts[ (ns._date_format.d > ns._date_format.m) * 1 ] || today.getDate()) * 1 ); } else return undefined;