------------------------------------------------------------------ Utility functions for parsing in getDateFromFormat() ------------------------------------------------------------------
function _isInteger(val) {
    var digits='1234567890';
    for (var i=0; i < val.length; i++) {
        if (digits.indexOf(val.charAt(i))===-1) { return false; }
    }
    return true;
}