Implement week mode for start_end_from_mode function.