X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/fb1da87cc688c778ea8fcb9a2baf69aced38d875..21b1fba6d82436a48b687a372a4c44ba89ee6d59:/js/kivi.js diff --git a/js/kivi.js b/js/kivi.js index 43e3718c2..97089645c 100644 --- a/js/kivi.js +++ b/js/kivi.js @@ -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;