MCPcopy Create free account
hub / github.com/apache/impala / ParseDayNameToken

Function ParseDayNameToken

be/src/runtime/datetime-parser-common.cc:286–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286bool 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
303int GetDayInYear(int year, int month, int day_in_month) {
304 DCHECK(month >= 1 && month <= 12);

Callers 1

ParseDateTimeMethod · 0.85

Calls 1

ParseNameTokenHelperFunction · 0.85

Tested by

no test coverage detected