diff --git a/program/utils.py b/program/utils.py index 0cc3eeecd49d0a4adc852eb068ef283ac27b95cd..3243da43875861793ef03265c5ceea5cdc9db65e 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