| 284 | } |
| 285 | |
| 286 | bool ParseDayNameToken(const DateTimeFormatToken& tok, const char* token_start, |
| 287 | const char** token_end, bool fx_modifier, int* day) { |
| 288 | DCHECK(token_start != nullptr); |
| 289 | DCHECK(tok.type == DAY_NAME || tok.type == DAY_NAME_SHORT); |
| 290 | DCHECK(day != nullptr); |
| 291 | DCHECK(token_end != nullptr && *token_end != nullptr); |
| 292 | DCHECK(token_start <= *token_end); |
| 293 | |
| 294 | return ParseNameTokenHelper( |
| 295 | tok.type == DAY_NAME_SHORT, |
| 296 | SHORT_DAY_NAME_LENGTH, MAX_DAY_NAME_LENGTH, |
| 297 | token_start, token_end, |
| 298 | fx_modifier && !tok.fm_modifier, |
| 299 | DAY_PREFIX_TO_SUFFIX, |
| 300 | day); |
| 301 | } |
| 302 | |
| 303 | int GetDayInYear(int year, int month, int day_in_month) { |
| 304 | DCHECK(month >= 1 && month <= 12); |
no test coverage detected