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

Method GetDayOfWeek

be/src/runtime/date-parse-util.cc:239–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239int DateParser::GetDayOfWeek(const DateValue& date) {
240 DCHECK(date.IsValid());
241 // DateValue::WeekDay() returns [0-6] where Monday is 0.
242 int dow = date.WeekDay();
243 // Convert to [1-7] where Sunday is 1.
244 return (dow + 1) % 7 + 1;
245}
246
247}

Callers

nothing calls this directly

Calls 2

WeekDayMethod · 0.80
IsValidMethod · 0.45

Tested by

no test coverage detected