Commits

Matthew Schinckel committed 928b531

Resolves #7: correctly parse 1h.

Comments (0)

Files changed (2)

 
 Changelog
 ----------
+0.6.3: Correctly parse '1h' as one hour (previously required 1hr).
+
 0.6.2: Remember to include VERSION number.
 
 0.6.0: Added total_seconds helper (for python < 2.7)
         d = re.match(
                      r'^((?P<weeks>((\d*\.\d+)|\d+))\W*w((ee)?k(s)?)(,)?\W*)?'
                      r'((?P<days>((\d*\.\d+)|\d+))\W*d(ay(s)?)?(,)?\W*)?'
-                     r'((?P<hours>((\d*\.\d+)|\d+))\W*h(ou)?r(s)?(,)?\W*)?'
+                     r'((?P<hours>((\d*\.\d+)|\d+))\W*h(ou)?r?(s)?(,)?\W*)?'
                      r'((?P<minutes>((\d*\.\d+)|\d+))\W*m(in(ute)?)?(s)?(,)?\W*)?'
                      r'((?P<seconds>((\d*\.\d+)|\d+))\W*s(ec(ond)?(s)?)?)?\W*$',
                      unicode(string))