convert words to lower case

This commit is contained in:
Mike Barrett 2012-12-30 23:42:39 +00:00
parent 343503b8be
commit 6cf492334c

View File

@ -75,6 +75,7 @@
// split string into groups and get total seconds for each group
var groups = string
.toLowerCase() // convert words to lower case
.replace(/[^\w+-]+/g, '') // remove white space
.match(/[-+]?[0-9]+[a-z]+/g); // match time groups (digit followed by time unit - i.e 5d 15m = 2 time groups)