Add initial fix for #156.

TODO: Fix the javascript binary parser too.
This commit is contained in:
booo 2012-07-24 14:03:30 +02:00
parent dea80ac588
commit 85829a98d3

View File

@ -8,7 +8,14 @@ var parseDate = function(isoDate) {
var match = dateMatcher.exec(isoDate);
//could not parse date
if(!match) {
return null;
dateMatcher = /^(\d{4})-(\d{2})-(\d{2})$/;
match = dateMatcher.test(isoDate);
if(!match) {
return null;
} else {
//it is a date in YYYY-MM-DD format
return new Date(isoDate);
}
}
var year = match[1];
var month = parseInt(match[2],10)-1;
@ -137,6 +144,7 @@ var init = function(register) {
register(700, parseFloat);
register(701, parseFloat);
register(16, parseBool);
register(1082, parseDate);
register(1114, parseDate);
register(1184, parseDate);
register(1005, parseIntegerArray); // _int2