function getFormatMatch(match, arr) {
    var obj = {}, value, num;
    arr.forEach(function(key, i) {
      value = match[i + 1];
      if(isUndefined(value) || value === '') return;
      if(key === 'year') {
        obj.yearAsString = value.replace(/'/, '');
      }
      num = parseFloat(value.replace(/'/, '').replace(/,/, '.'));
      obj[key] = !isNaN(num) ? num : value.toLowerCase();
    });
    return obj;
  }
function getFormatMatch(match, arr) {
    var obj = {}, value, num;
    arr.forEach(function(key, i) {
      value = match[i + 1];
      if(isUndefined(value) || value === '') return;
      if(key === 'year') {
        obj.yearAsString = value.replace(/'/, '');
      }
      num = parseFloat(value.replace(/'/, '').replace(/,/, '.'));
      obj[key] = !isNaN(num) ? num : value.toLowerCase();
    });
    return obj;
  }
function getFormatMatch ( match , arr ) { var obj = { } , value , num ; arr . forEach ( function ( key , i ) { value = match [ i + 1 ] ; if ( isUndefined ( value ) || value === '' ) return ; if ( key === 'year' ) { obj . yearAsString = value . replace ( / ' / , '' ) ; } num = parseFloat ( value . replace ( / ' / , '' ) . replace ( / , / , '.' ) ) ; obj [ key ] = ! isNaN ( num ) ? num : value . toLowerCase ( ) ; } ) ; return obj ; }
Date parsing helpers
Date parsing helpers