From 440e7d71c6149efca0b836d13e77bf7259f265a1 Mon Sep 17 00:00:00 2001 From: jswhit Date: Fri, 25 Sep 2020 20:16:36 -0600 Subject: [PATCH] remove duplicate code --- cftime/_cftime.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/cftime/_cftime.py b/cftime/_cftime.py index 157316be..020cd6c3 100644 --- a/cftime/_cftime.py +++ b/cftime/_cftime.py @@ -1303,32 +1303,6 @@ def _strftime(dt, fmt): s = s[:site] + syear + s[site + 4:] return s -def is_leap_julian(year): - "Return 1 if year is a leap year in the Julian calendar, 0 otherwise." - return _is_leap(year, calendar='julian') - -def is_leap_proleptic_gregorian(year): - "Return 1 if year is a leap year in the Proleptic Gregorian calendar, 0 otherwise." - return _is_leap(year, calendar='proleptic_gregorian') - -def is_leap_gregorian(year): - "Return 1 if year is a leap year in the Gregorian calendar, 0 otherwise." - return _is_leap(year, calendar='standard') - -def all_leap(year): - "Return True for all years." - return True - -def no_leap(year): - "Return False for all years." - return False - -def month_lengths(is_leap, year): - if is_leap(year): - return _dpm_leap - else: - return _dpm - def _round_half_up(x): # 'round half up' so 0.5 rounded to 1 (instead of 0 as in numpy.round) return np.ceil(np.floor(2.*x)/2.)