Can you use regex here? Also, a few tests to ensure that things don't break if only minutes or seconds are given would be good.