Support creating durations from strings.