MCPcopy Create free account
hub / github.com/apache/arrow / is_leapyear

Function is_leapyear

python/pyarrow/src/arrow/python/datetime.cc:98–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};
97
98static bool is_leapyear(int64_t year) {
99 return (year & 0x3) == 0 && // year % 4 == 0
100 ((year % 100) != 0 || (year % 400) == 0);
101}
102
103// Calculates the days offset from the 1970 epoch.
104static int64_t get_days_from_date(int64_t date_year, int64_t date_month,

Callers 2

get_days_from_dateFunction · 0.85
get_date_from_daysFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected