Skip to content
Snippets Groups Projects
Commit 95eae007 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Remove unused utils

parent 3ec4be7c
No related branches found
No related tags found
No related merge requests found
...@@ -18,25 +18,6 @@ ...@@ -18,25 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment