From 95eae007cf99128594fd90260d0713bd05a60f80 Mon Sep 17 00:00:00 2001 From: Ernesto Rico Schmidt <ernesto@helsinki.at> Date: Sun, 13 Feb 2022 22:02:57 -0400 Subject: [PATCH] Remove unused utils --- program/utils.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/program/utils.py b/program/utils.py index 0cc3eeec..3243da43 100644 --- a/program/utils.py +++ b/program/utils.py @@ -18,25 +18,6 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -import json -from datetime import datetime, date, timedelta -from os.path import join -from django.conf import settings -def get_cached_shows(): - cache_dir = getattr(settings, 'AUTOMATION_CACHE_DIR', 'cache') - cached_shows = join(cache_dir, 'shows.json') - with open(cached_shows) as shows_json: - shows = json.loads(shows_json.read()) - - return shows - - -def tofirstdayinisoweek(year, week): - # http://stackoverflow.com/questions/5882405/get-date-from-iso-week-number-in-python - ret = datetime.strptime('%04d-%02d-1' % (year, week), '%Y-%W-%w') - if date(year, 1, 4).isoweekday() > 4: - ret -= timedelta(days=7) - return ret -- GitLab