whopperWednesday 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: whopperWednesday
3
+ Version: 0.2.0
4
+ Summary: Returns True if it is Whopper Wednesday (US, UK, Canada), else False.
5
+ Requires-Python: >=3.8
6
+ Description-Content-Type: text/markdown
7
+
8
+ # whopperWednesday
9
+
10
+ Zero dependencies. Tells you whether it's Whopper Wednesday.
11
+
12
+ ```bash
13
+ pip install whopperWednesday
14
+ ```
15
+
16
+ ```python
17
+ from datetime import date
18
+ from whopperWednesday import isItWhopperWednesday
19
+
20
+ isItWhopperWednesday() # True on Wednesdays, else False
21
+ isItWhopperWednesday(country="CA") # US, UK and Canada supported
22
+ isItWhopperWednesday(date(2026, 11, 25), "UK") # True
23
+ isItWhopperWednesday(country="France") # False (no Whopper Wednesday)
24
+ ```
25
+
26
+ Country codes are case-insensitive and accept aliases (`USA`, `GB`, `Canada`, ...).
27
+ The day is checked using your computer's local date.
@@ -0,0 +1,20 @@
1
+ # whopperWednesday
2
+
3
+ Zero dependencies. Tells you whether it's Whopper Wednesday.
4
+
5
+ ```bash
6
+ pip install whopperWednesday
7
+ ```
8
+
9
+ ```python
10
+ from datetime import date
11
+ from whopperWednesday import isItWhopperWednesday
12
+
13
+ isItWhopperWednesday() # True on Wednesdays, else False
14
+ isItWhopperWednesday(country="CA") # US, UK and Canada supported
15
+ isItWhopperWednesday(date(2026, 11, 25), "UK") # True
16
+ isItWhopperWednesday(country="France") # False (no Whopper Wednesday)
17
+ ```
18
+
19
+ Country codes are case-insensitive and accept aliases (`USA`, `GB`, `Canada`, ...).
20
+ The day is checked using your computer's local date.
@@ -0,0 +1,14 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "whopperWednesday"
7
+ version = "0.2.0"
8
+ description = "Returns True if it is Whopper Wednesday (US, UK, Canada), else False."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ dependencies = []
12
+
13
+ [tool.setuptools]
14
+ packages = ["whopperWednesday"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,23 @@
1
+ from datetime import date
2
+ from whopperWednesday import isItWhopperWednesday
3
+
4
+ WED = date(2026, 11, 25)
5
+ MON = date(2026, 11, 23)
6
+
7
+ def test_wednesday():
8
+ assert isItWhopperWednesday(WED) is True
9
+
10
+ def test_not_wednesday():
11
+ assert isItWhopperWednesday(MON) is False
12
+
13
+ def test_supported_countries():
14
+ for c in ["US", "uk", "Canada", "usa", "GB", " ca "]:
15
+ assert isItWhopperWednesday(WED, c) is True
16
+ assert isItWhopperWednesday(MON, c) is False
17
+
18
+ def test_unsupported_country():
19
+ assert isItWhopperWednesday(WED, "France") is False
20
+
21
+ def test_today_returns_bool():
22
+ assert isinstance(isItWhopperWednesday(), bool)
23
+ assert isinstance(isItWhopperWednesday(country="CA"), bool)
@@ -0,0 +1,33 @@
1
+ from datetime import date
2
+
3
+ __version__ = "0.2.0"
4
+ __all__ = ["isItWhopperWednesday", "COUNTRIES"]
5
+
6
+ # Countries with Whopper Wednesday
7
+ COUNTRIES = {
8
+ "US": "US", "USA": "US", "UNITED STATES": "US",
9
+ "UK": "UK", "GB": "UK", "UNITED KINGDOM": "UK",
10
+ "CA": "CA", "CAN": "CA", "CANADA": "CA",
11
+ }
12
+
13
+
14
+ def isItWhopperWednesday(day=None, country=None):
15
+ '''
16
+ Evaluates if it is Whopper Wednesday.
17
+
18
+ Inputs:
19
+ day -- a datetime.date (default today)
20
+ country -- "US", "UK" or "CA" (default None)
21
+
22
+ Outputs:
23
+ True -- it is Whopper Wednesday
24
+ False -- it is not Whopper Wednesday
25
+ '''
26
+ if day is None:
27
+ day = date.today()
28
+ if country is not None and country.strip().upper() not in COUNTRIES:
29
+ return False
30
+ if day.weekday() == 2:
31
+ return True
32
+ else:
33
+ return False
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: whopperWednesday
3
+ Version: 0.2.0
4
+ Summary: Returns True if it is Whopper Wednesday (US, UK, Canada), else False.
5
+ Requires-Python: >=3.8
6
+ Description-Content-Type: text/markdown
7
+
8
+ # whopperWednesday
9
+
10
+ Zero dependencies. Tells you whether it's Whopper Wednesday.
11
+
12
+ ```bash
13
+ pip install whopperWednesday
14
+ ```
15
+
16
+ ```python
17
+ from datetime import date
18
+ from whopperWednesday import isItWhopperWednesday
19
+
20
+ isItWhopperWednesday() # True on Wednesdays, else False
21
+ isItWhopperWednesday(country="CA") # US, UK and Canada supported
22
+ isItWhopperWednesday(date(2026, 11, 25), "UK") # True
23
+ isItWhopperWednesday(country="France") # False (no Whopper Wednesday)
24
+ ```
25
+
26
+ Country codes are case-insensitive and accept aliases (`USA`, `GB`, `Canada`, ...).
27
+ The day is checked using your computer's local date.
@@ -0,0 +1,8 @@
1
+ README.md
2
+ pyproject.toml
3
+ test/testWhopper.py
4
+ whopperWednesday/__init__.py
5
+ whopperWednesday.egg-info/PKG-INFO
6
+ whopperWednesday.egg-info/SOURCES.txt
7
+ whopperWednesday.egg-info/dependency_links.txt
8
+ whopperWednesday.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ whopperWednesday