summaryrefslogtreecommitdiff
path: root/plugin.video.spurs-tv/resources/lib/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugin.video.spurs-tv/resources/lib/utils.py')
-rw-r--r--plugin.video.spurs-tv/resources/lib/utils.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugin.video.spurs-tv/resources/lib/utils.py b/plugin.video.spurs-tv/resources/lib/utils.py
new file mode 100644
index 0000000..9742a96
--- /dev/null
+++ b/plugin.video.spurs-tv/resources/lib/utils.py
@@ -0,0 +1,9 @@
+import time
+from datetime import date
+
+def date_from_str(date_str, date_format):
+ return date(*(time.strptime(date_str, date_format)[0:3]))
+
+def add_item_info(item, title, item_date):
+ item['info'] = {'title': title,
+ 'date': item_date.strftime("%d.%m.%Y")}