Queer European MD passionate about IT
Просмотр исходного кода

Weekdays multilanguage dictionary

Davte 4 лет назад
Родитель
Сommit
91ab00eec6
2 измененных файлов с 32 добавлено и 1 удалено
  1. 1 1
      davtelepot/__init__.py
  2. 31 0
      davtelepot/utilities.py

+ 1 - 1
davtelepot/__init__.py

@@ -14,7 +14,7 @@ __author__ = "Davide Testa"
 __email__ = "davide@davte.it"
 __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
 __license__ = "GNU General Public License v3.0"
-__version__ = "2.4.18"
+__version__ = "2.4.19"
 __maintainer__ = "Davide Testa"
 __contact__ = "t.me/davte"
 

+ 31 - 0
davtelepot/utilities.py

@@ -23,6 +23,37 @@ from aiohttp import web
 from bs4 import BeautifulSoup
 
 
+weekdays = collections.OrderedDict()
+weekdays[0] = {
+    'en': "Sunday",
+    'it': "Domenica",
+}
+weekdays[1] = {
+    'en': "Monday",
+    'it': "Lunedì",
+}
+weekdays[2] = {
+    'en': "Tuesday",
+    'it': "Martedì",
+}
+weekdays[3] = {
+    'en': "Wednesday",
+    'it': "Mercoledì",
+}
+weekdays[4] = {
+    'en': "Thursday",
+    'it': "Giovedì",
+}
+weekdays[5] = {
+    'en': "Friday",
+    'it': "Venerdì",
+}
+weekdays[6] = {
+    'en': "Saturday",
+    'it': "Sabato",
+}
+
+
 def sumif(iterable, condition):
     """Sum all `iterable` items matching `condition`."""
     return sum(