Comparing version 1.0.4 to 1.0.5
@@ -51,3 +51,3 @@ // Optparse.js 1.0.3 - Option Parser for Javascript | ||
if(m == null) throw OptError('Expected a date representation in the "yyyy-mm-dd" format.'); | ||
return new Date(parseInt(m[0]), parseInt(m[1]), parseInt(m[2])); | ||
return new Date(parseInt(m[0]), parseInt(m[1]) - 1, parseInt(m[2])); | ||
}; | ||
@@ -122,5 +122,5 @@ | ||
// then find a filter that suites. | ||
var optional_match = ARG_OPTIONAL_RE.test(m[2]); | ||
var filter_name = optional_match === null ? m[2] : optional_match[1]; | ||
optional = optional_match !== null; | ||
var optional = ARG_OPTIONAL_RE.test(m[2]); | ||
var optional_match = m[2].match(ARG_OPTIONAL_RE); | ||
var filter_name = optional ? optional_match[1] : m[2]; | ||
filter = filters[filter_name]; | ||
@@ -127,0 +127,0 @@ if(filter === undefined) filter = filters[DEFAULT_FILTER]; |
@@ -6,3 +6,3 @@ { | ||
"keywords": ["option", "parser", "command-line", "cli", "terminal"], | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
22561