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

Function GetDayInYear

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

Source from the content-addressed store, hash-verified

301}
302
303int GetDayInYear(int year, int month, int day_in_month) {
304 DCHECK(month >= 1 && month <= 12);
305 const vector<int>& month_ranges = IsLeapYear(year) ? LEAP_YEAR_MONTH_RANGES :
306 MONTH_RANGES;
307 return day_in_month + month_ranges[month - 1];
308}
309
310bool GetMonthAndDayFromDaysSinceJan1(int year, int days_since_jan1, int* month,
311 int* day) {

Callers 3

FormatMethod · 0.85
FormatMethod · 0.85
GetWeekOfYearFunction · 0.85

Calls 1

IsLeapYearFunction · 0.85

Tested by

no test coverage detected