Commits

Matthew Schinckel committed 451e07f Merge

Merged in kosz85/django-timedelta-field/strip-when-parse (pull request #14)

parse should deal with additional spaces - adding strip

Comments (0)

Files changed (1)

timedelta/helpers.py

     >>> parse(nice_repr(zero, 'short'))
     datetime.timedelta(0)
     """
+    string = string.strip()
+
     if string == "":
         raise TypeError("'%s' is not a valid time interval" % string)
     # This is the format we get from sometimes Postgres, sqlite,