Repository: adamchainz/pretty-cron

Issue:
Missing key in _WEEKDAYS
Hello,

linux crontab allows users to set sunday as 0 or 7 (its same for crontab parser). When I was parsing some of my users cron settings I got key_error exception when they were using this syntax (7 as for sunday), you might consider adding this. (I have currently monkey patched that for time being)

Thanks


Discussion:

Patch:
diff --git a/HISTORY.rst b/HISTORY.rst
index 985360a..7b57b97 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -7,6 +7,8 @@ Pending Release
 ---------------
 
 * New release notes here
+* Now interprets day 7 as Sunday as well as 0, like Linux crontab parsers -
+  thanks @vetyy.
 
 1.0.0 (2015-07-28)
 ------------------
diff --git a/pretty_cron/api.py b/pretty_cron/api.py
index 14af101..f7ac1d0 100644
--- a/pretty_cron/api.py
+++ b/pretty_cron/api.py
@@ -76,6 +76,7 @@ _WEEKDAYS = {
     4: "Thursday",
     5: "Friday",
     6: "Saturday",
+    7: "Sunday",
 }
 
 


Test patch:
diff --git a/tests/test_prettify.py b/tests/test_prettify.py
index cec1af2..df46049 100644
--- a/tests/test_prettify.py
+++ b/tests/test_prettify.py
@@ -28,6 +28,9 @@ class PrettyCronTest(unittest.TestCase):
     def test_weekly(self):
         assert pc("0 0 * * 0") == "At 00:00 every Sunday"
 
+    def test_day_7_is_sunday(self):
+        assert pc("0 0 * * 7") == "At 00:00 every Sunday"
+
     def test_monthly_and_weekly(self):
         assert (
             pc("0 0 1 * 1") ==