Commit d1e5995e authored by Cédric Moreau's avatar Cédric Moreau

--amstart option handles "DD-MM-YYYY hh:mm:ss" syntax too

parent b6d36989
......@@ -423,8 +423,10 @@ function connect(listenHTTP, serverFactory, callback) {
function parseMoment (d) {
if (d.toLowerCase() == 'now') {
return parseInt(moment().format("X"));
} else if (d.match(/\d{2}-\d{2}-\d{4}/)) {
} else if (d.match(/^\d{2}-\d{2}-\d{4}$/)) {
return parseInt(moment(d, "DD-MM-YYYY").format("X"));
} else if (d.match(/^\d{2}-\d{2}-\d{4} \d{2}:\d{2}:\d{2}$/)) {
return parseInt(moment(d, "DD-MM-YYYY hh:mm:ss").format("X"));
} else {
return parseInt(d);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment