Parses duration strings