From f7e79dd1bbb986967469273847882c230bbe3a62 Mon Sep 17 00:00:00 2001 From: Chris Van Date: Sun, 30 Dec 2012 13:32:42 -0500 Subject: [PATCH] do not strip floating points when parsing timestamp (fixes #1) --- timestring.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timestring.js b/timestring.js index 623a927..88858e3 100644 --- a/timestring.js +++ b/timestring.js @@ -77,7 +77,7 @@ // split string into groups and get total seconds for each group var groups = string - .replace(/[^\w+-]+/g, '') // remove white space + .replace(/[^\.\w+-]+/g, '') // remove white space .match(/[-+]?[0-9]*\.?[0-9]+\D/g); // match time groups (digit followed by time unit - i.e 5d 15m = 2 time groups) if (groups !== null) {