parent
dea80ac588
commit
85829a98d3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user