pycalender 1.0.0__py3-none-any.whl

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.
pycalender/__init__.py ADDED
@@ -0,0 +1 @@
1
+ from .core import gdw
pycalender/core.py ADDED
@@ -0,0 +1,6 @@
1
+ from datetime import date
2
+
3
+
4
+ def gdw(year, month, day):
5
+ """Return the day of the week for a given date."""
6
+ return date(year, month, day).strftime("%A")
@@ -0,0 +1,87 @@
1
+ Metadata-Version: 2.4
2
+ Name: pycalender
3
+ Version: 1.0.0
4
+ Summary: A simple 100-year calendar for finding the day of the week
5
+ Author: Naitik Singh
6
+ License: MIT License
7
+
8
+ Copyright (c) 2026 Naitik Singh
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+ Requires-Python: >=3.10
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Dynamic: license-file
31
+
32
+ # PyCalender
33
+
34
+ A lightweight Python package for finding the day of the week for a given date.
35
+
36
+ ## Features
37
+
38
+ - Find the day of the week for any valid date.
39
+ - Simple `gdw()` function.
40
+ - No external dependencies.
41
+ - Supports Python 3.10 and newer.
42
+
43
+ ## Installation
44
+
45
+ Install PyCalender from PyPI:
46
+
47
+ ```bash
48
+ pip install pycalender
49
+ ```
50
+
51
+ ## Usage
52
+
53
+ ```python
54
+ from pycalender import gdw
55
+
56
+ day = gdw(2023, 10, 15)
57
+
58
+ print(day)
59
+ ```
60
+
61
+ Output:
62
+
63
+ ```text
64
+ Sunday
65
+ ```
66
+
67
+ ## Error Handling
68
+
69
+ Invalid dates raise Python's built-in `ValueError`.
70
+
71
+ For example:
72
+
73
+ ```python
74
+ from pycalender import gdw
75
+
76
+ gdw(2023, 2, 30)
77
+ ```
78
+
79
+ raises a `ValueError` because February 30 is not a valid date.
80
+
81
+ ## Requirements
82
+
83
+ - Python 3.10 or newer
84
+
85
+ ## License
86
+
87
+ PyCalender is licensed under the MIT License.
@@ -0,0 +1,7 @@
1
+ pycalender/__init__.py,sha256=4MQOlsmeYQBofs3b05Dqfb6_LXcDakvU14ulEOSpn24,21
2
+ pycalender/core.py,sha256=u3YCg3zUqyoCu8SBptzucz1N0FHr27ijKSZQiwDlabU,158
3
+ pycalender-1.0.0.dist-info/licenses/LICENSE,sha256=tO-IiTJCYXigK7NwaILaRopD36cPcTYHaJ4q2etzXcA,1068
4
+ pycalender-1.0.0.dist-info/METADATA,sha256=EuLOaiJ1TJoO-5a7k8eSyx2W_QuTVOvOzfYPNzJ4He8,2245
5
+ pycalender-1.0.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
6
+ pycalender-1.0.0.dist-info/top_level.txt,sha256=k8RHUGbpC_t7olO20qE1eIb4arOEujv-ZdVQ6Ouu2tA,11
7
+ pycalender-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Naitik Singh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ pycalender