dateutilx 0.1.0__tar.gz → 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.
Files changed (33) hide show
  1. {dateutilx-0.1.0 → dateutilx-0.2.0}/.gitignore +1 -1
  2. dateutilx-0.2.0/LICENSE +58 -0
  3. dateutilx-0.2.0/PKG-INFO +191 -0
  4. dateutilx-0.2.0/README.md +107 -0
  5. {dateutilx-0.1.0 → dateutilx-0.2.0}/pyproject.toml +8 -8
  6. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/easter.py +2 -2
  7. dateutilx-0.2.0/src/helper/__init__.py +4 -0
  8. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/helper/constants.py +0 -5
  9. dateutilx-0.2.0/src/helper/funcs.py +5 -0
  10. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/parser/_parser.py +69 -71
  11. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/parser/isoparser.py +24 -29
  12. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/parser/utils.py +3 -4
  13. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/relativedelta.py +150 -244
  14. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/rrule.py +131 -152
  15. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/tz/_win.py +22 -21
  16. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/tz/tz.py +111 -111
  17. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/tz/win.py +1 -1
  18. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/tzwin.py +1 -1
  19. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/utils.py +5 -6
  20. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/weekday.py +7 -7
  21. dateutilx-0.1.0/AUTHORS.md +0 -136
  22. dateutilx-0.1.0/PKG-INFO +0 -241
  23. dateutilx-0.1.0/README.rst +0 -159
  24. dateutilx-0.1.0/src/dateutil/__init__.py +0 -5
  25. dateutilx-0.1.0/src/dateutilx/helper/__init__.py +0 -1
  26. {dateutilx-0.1.0 → dateutilx-0.2.0/.base_project}/LICENSE +0 -0
  27. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/__init__.py +0 -0
  28. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/errors.py +0 -0
  29. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/info.py +0 -0
  30. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/parser/__init__.py +0 -0
  31. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/tz/__init__.py +0 -0
  32. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/tz/_common.py +0 -0
  33. {dateutilx-0.1.0/src/dateutilx → dateutilx-0.2.0/src}/tz/_factories.py +0 -0
@@ -13,7 +13,7 @@ dist/
13
13
  .tox/
14
14
  .pytest_cache/
15
15
  venv/
16
- .venv/
16
+ .venv*/
17
17
  .hypothesis/
18
18
  .coverage
19
19
 
@@ -0,0 +1,58 @@
1
+ Copyright 2017- Paul Ganssle <paul@ganssle.io>
2
+ Copyright 2017- dateutil contributors (see AUTHORS file)
3
+ Copyright 2026- Rishabh B
4
+ Copyright 2026- dateutilx contributors (see AUTHORS file)
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+
18
+ The above license applies to all contributions after 2017-12-01, as well as
19
+ all contributions that have been re-licensed (see AUTHORS file for the list of
20
+ contributors who have re-licensed their code).
21
+ --------------------------------------------------------------------------------
22
+ dateutilx - Extensions to the standard Python datetime module.
23
+
24
+ Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>
25
+ Copyright (c) 2012-2014 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>
26
+ Copyright (c) 2014-2016 - Yaron de Leeuw <me@jarondl.net>
27
+ Copyright (c) 2015-2026 - Paul Ganssle <paul@ganssle.io>
28
+ Copyright (c) 2015-2026 - dateutil contributors (see AUTHORS file)
29
+ Copyright (c) 2026- - Rishabh B <>
30
+ Copyright (c) 2026- - dateutilx contributors (see AUTHORS file)
31
+
32
+ All rights reserved.
33
+
34
+ Redistribution and use in source and binary forms, with or without
35
+ modification, are permitted provided that the following conditions are met:
36
+
37
+ * Redistributions of source code must retain the above copyright notice,
38
+ this list of conditions and the following disclaimer.
39
+ * Redistributions in binary form must reproduce the above copyright notice,
40
+ this list of conditions and the following disclaimer in the documentation
41
+ and/or other materials provided with the distribution.
42
+ * Neither the name of the copyright holder nor the names of its
43
+ contributors may be used to endorse or promote products derived from
44
+ this software without specific prior written permission.
45
+
46
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
47
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
48
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
49
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
50
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
51
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
52
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
53
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
54
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
55
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
56
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
57
+
58
+ The above BSD License Applies to all code, even that also covered by Apache 2.0.
@@ -0,0 +1,191 @@
1
+ Metadata-Version: 2.4
2
+ Name: dateutilx
3
+ Version: 0.2.0
4
+ Summary: Modern extension to the standard Python datetime module
5
+ Project-URL: Homepage, https://github.com/rsb-23/dateutilx
6
+ Project-URL: Documentation, https://dateutilx.readthedocs.io/en/stable/
7
+ Project-URL: Source, https://github.com/rsb-23/dateutilx
8
+ Author: Rishabh B
9
+ License: Copyright 2017- Paul Ganssle <paul@ganssle.io>
10
+ Copyright 2017- dateutil contributors (see AUTHORS file)
11
+ Copyright 2026- Rishabh B
12
+ Copyright 2026- dateutilx contributors (see AUTHORS file)
13
+
14
+ Licensed under the Apache License, Version 2.0 (the "License");
15
+ you may not use this file except in compliance with the License.
16
+ You may obtain a copy of the License at
17
+
18
+ http://www.apache.org/licenses/LICENSE-2.0
19
+
20
+ Unless required by applicable law or agreed to in writing, software
21
+ distributed under the License is distributed on an "AS IS" BASIS,
22
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
+ See the License for the specific language governing permissions and
24
+ limitations under the License.
25
+
26
+ The above license applies to all contributions after 2017-12-01, as well as
27
+ all contributions that have been re-licensed (see AUTHORS file for the list of
28
+ contributors who have re-licensed their code).
29
+ --------------------------------------------------------------------------------
30
+ dateutilx - Extensions to the standard Python datetime module.
31
+
32
+ Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>
33
+ Copyright (c) 2012-2014 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>
34
+ Copyright (c) 2014-2016 - Yaron de Leeuw <me@jarondl.net>
35
+ Copyright (c) 2015-2026 - Paul Ganssle <paul@ganssle.io>
36
+ Copyright (c) 2015-2026 - dateutil contributors (see AUTHORS file)
37
+ Copyright (c) 2026- - Rishabh B <>
38
+ Copyright (c) 2026- - dateutilx contributors (see AUTHORS file)
39
+
40
+ All rights reserved.
41
+
42
+ Redistribution and use in source and binary forms, with or without
43
+ modification, are permitted provided that the following conditions are met:
44
+
45
+ * Redistributions of source code must retain the above copyright notice,
46
+ this list of conditions and the following disclaimer.
47
+ * Redistributions in binary form must reproduce the above copyright notice,
48
+ this list of conditions and the following disclaimer in the documentation
49
+ and/or other materials provided with the distribution.
50
+ * Neither the name of the copyright holder nor the names of its
51
+ contributors may be used to endorse or promote products derived from
52
+ this software without specific prior written permission.
53
+
54
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
55
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
56
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
57
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
58
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
59
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
60
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
61
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
62
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
63
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
64
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
65
+
66
+ The above BSD License Applies to all code, even that also covered by Apache 2.0.
67
+ License-File: LICENSE
68
+ Keywords: date,datetime,dateutil,time,timezone
69
+ Classifier: Development Status :: 4 - Beta
70
+ Classifier: Intended Audience :: Developers
71
+ Classifier: License :: OSI Approved :: Apache Software License
72
+ Classifier: License :: OSI Approved :: BSD License
73
+ Classifier: Programming Language :: Python
74
+ Classifier: Programming Language :: Python :: 3
75
+ Classifier: Programming Language :: Python :: 3.11
76
+ Classifier: Programming Language :: Python :: 3.12
77
+ Classifier: Programming Language :: Python :: 3.13
78
+ Classifier: Programming Language :: Python :: 3.14
79
+ Classifier: Programming Language :: Python :: 3.15
80
+ Classifier: Topic :: Software Development :: Libraries
81
+ Requires-Python: >=3.11
82
+ Requires-Dist: tzdata; sys_platform == 'win32'
83
+ Description-Content-Type: text/markdown
84
+
85
+ > [!NOTE]
86
+ > This package is rewrite of `python-dateutil v2.9.0.post0` as base, to support active python versions only.
87
+ > It is not related with the base project and its authors.
88
+ > Docs of base project are under `.base_project/`
89
+
90
+ # dateutilx - powerful extensions to datetime
91
+
92
+ | | |
93
+ |----------------|---------------------------------------------------------------------------------------------|
94
+ | Compatibility | ![Py-Version] |
95
+ | Quality Checks | [![lint check][lint-badge]]() [![tests][tests-badge]]() [![pre-commit][pre-commit-badge]]() |
96
+ | Package | ![pypi-v] ![pypi-downloads] |
97
+ | MetaData | [![license-badge]][license] |
98
+
99
+ The `dateutilx` module provides powerful extensions to the standard `datetime` module, available in Python.
100
+
101
+ ## Installation
102
+
103
+ `dateutilx` can be installed from PyPI using `pip`
104
+
105
+ ```
106
+ pip install dateutilx
107
+ ```
108
+
109
+ ## Download
110
+
111
+ dateutilx is available on PyPI
112
+ https://pypi.org/project/dateutilx/
113
+
114
+ The documentation is hosted at:
115
+ https://dateutilx.readthedocs.io/en/stable/
116
+
117
+ ## Code
118
+
119
+ The code and issue tracker are hosted on GitHub:
120
+ https://github.com/rsb-23/dateutilx/
121
+
122
+ ## Features
123
+
124
+ * Computing of relative deltas (next month, next year, next Monday, last week of month, etc);
125
+ * Computing of relative deltas between two given date and/or datetime objects;
126
+ * Computing of dates based on very flexible recurrence rules, using a superset of
127
+ the [iCalendar](https://www.ietf.org/rfc/rfc2445.txt) specification. Parsing of RFC strings is supported as well.
128
+ * Generic parsing of dates in almost any string format;
129
+ * Timezone (tzinfo) implementations for tzfile (5) format files (/etc/localtime, /usr/share/zoneinfo, etc), TZ
130
+ environment string (in all known formats), iCalendar format files, given ranges (with help from relative deltas),
131
+ local machine timezone, fixed offset timezone, UTC timezone, and Windows registry-based time zones.
132
+ * Internal up-to-date world timezone information based on Olson's database.
133
+ * Computing of Easter Sunday dates for any given year, using Western, Orthodox or Julian algorithms;
134
+ * A comprehensive test suite.
135
+
136
+ ## Quick example
137
+
138
+ Here's a snapshot, just to give an idea about the power of the package. For more examples, look at the documentation.
139
+
140
+ Suppose you want to know how much time is left, in years/months/days/etc, before the next easter happening on a year
141
+ with a Friday 13th in August, and you want to get today's date out of the "date" unix system command. Here is the code:
142
+
143
+ ```pycon
144
+ >>> from datetime import *
145
+ >>> from dateutilx.easter import *
146
+ >>> from dateutilx.parser import *
147
+ >>> from dateutilx.relativedelta import RelativeDelta
148
+ >>> from dateutilx.rrule import *
149
+ >>>
150
+ >>> now = parse("Sat Oct 11 17:13:46 UTC 2003")
151
+ >>> today = now.date()
152
+ >>> year = rrule(YEARLY, dtstart=now, bymonth=8, bymonthday=13, byweekday=FR)[0].year
153
+ >>> rdelta = relativedelta(easter(year), today)
154
+ >>> print("Today is: %s" % today)
155
+ "Today is: 2003-10-11"
156
+ >>> print("Year with next Aug 13th on a Friday is: %s" % year)
157
+ "Year with next Aug 13th on a Friday is: 2004"
158
+ >>> print("How far is the Easter of that year: %s" % rdelta)
159
+ "How far is the Easter of that year: RelativeDelta(months=+6)"
160
+ >>> print("And the Easter of that year is: %s" % (today + rdelta))
161
+ "And the Easter of that year is: 2004-04-11"
162
+ ```
163
+
164
+ Being exactly 6 months ahead was **really** a coincidence :)
165
+
166
+ ## Contributing
167
+
168
+ We welcome many types of contributions - bug reports, pull requests (code, infrastructure or documentation fixes). For
169
+ more information about how to contribute to the project, see the `CONTRIBUTING.md` file in the repository.
170
+
171
+ ## Author
172
+
173
+ The dateutilx module is improved/re-written by rsb-23 in 2026.
174
+
175
+ ## License
176
+
177
+ All contributions after December 1, 2017 released under dual license -
178
+ either [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) or
179
+ the [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause). Contributions before December 1, 2017 - except
180
+ those those explicitly relicensed - are released only under the BSD 3-Clause License.
181
+
182
+
183
+ [license]: https://github.com/rsb-23/dateutilx/blob/main/LICENSE
184
+ [lint-badge]: https://github.com/rsb-23/dateutilx/actions/workflows/code-lint.yml/badge.svg
185
+ [tests-badge]: https://github.com/rsb-23/dateutilx/actions/workflows/code-test.yml/badge.svg
186
+
187
+ [license-badge]: https://img.shields.io/pypi/l/dateutilx.svg?style=flat-square
188
+ [pre-commit-badge]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
189
+ [py-version]: https://img.shields.io/pypi/pyversions/dateutilx
190
+ [pypi-downloads]: https://img.shields.io/pypi/dm/dateutilx?label=Downloads
191
+ [pypi-v]: https://img.shields.io/pypi/v/dateutilx?label=pypi
@@ -0,0 +1,107 @@
1
+ > [!NOTE]
2
+ > This package is rewrite of `python-dateutil v2.9.0.post0` as base, to support active python versions only.
3
+ > It is not related with the base project and its authors.
4
+ > Docs of base project are under `.base_project/`
5
+
6
+ # dateutilx - powerful extensions to datetime
7
+
8
+ | | |
9
+ |----------------|---------------------------------------------------------------------------------------------|
10
+ | Compatibility | ![Py-Version] |
11
+ | Quality Checks | [![lint check][lint-badge]]() [![tests][tests-badge]]() [![pre-commit][pre-commit-badge]]() |
12
+ | Package | ![pypi-v] ![pypi-downloads] |
13
+ | MetaData | [![license-badge]][license] |
14
+
15
+ The `dateutilx` module provides powerful extensions to the standard `datetime` module, available in Python.
16
+
17
+ ## Installation
18
+
19
+ `dateutilx` can be installed from PyPI using `pip`
20
+
21
+ ```
22
+ pip install dateutilx
23
+ ```
24
+
25
+ ## Download
26
+
27
+ dateutilx is available on PyPI
28
+ https://pypi.org/project/dateutilx/
29
+
30
+ The documentation is hosted at:
31
+ https://dateutilx.readthedocs.io/en/stable/
32
+
33
+ ## Code
34
+
35
+ The code and issue tracker are hosted on GitHub:
36
+ https://github.com/rsb-23/dateutilx/
37
+
38
+ ## Features
39
+
40
+ * Computing of relative deltas (next month, next year, next Monday, last week of month, etc);
41
+ * Computing of relative deltas between two given date and/or datetime objects;
42
+ * Computing of dates based on very flexible recurrence rules, using a superset of
43
+ the [iCalendar](https://www.ietf.org/rfc/rfc2445.txt) specification. Parsing of RFC strings is supported as well.
44
+ * Generic parsing of dates in almost any string format;
45
+ * Timezone (tzinfo) implementations for tzfile (5) format files (/etc/localtime, /usr/share/zoneinfo, etc), TZ
46
+ environment string (in all known formats), iCalendar format files, given ranges (with help from relative deltas),
47
+ local machine timezone, fixed offset timezone, UTC timezone, and Windows registry-based time zones.
48
+ * Internal up-to-date world timezone information based on Olson's database.
49
+ * Computing of Easter Sunday dates for any given year, using Western, Orthodox or Julian algorithms;
50
+ * A comprehensive test suite.
51
+
52
+ ## Quick example
53
+
54
+ Here's a snapshot, just to give an idea about the power of the package. For more examples, look at the documentation.
55
+
56
+ Suppose you want to know how much time is left, in years/months/days/etc, before the next easter happening on a year
57
+ with a Friday 13th in August, and you want to get today's date out of the "date" unix system command. Here is the code:
58
+
59
+ ```pycon
60
+ >>> from datetime import *
61
+ >>> from dateutilx.easter import *
62
+ >>> from dateutilx.parser import *
63
+ >>> from dateutilx.relativedelta import RelativeDelta
64
+ >>> from dateutilx.rrule import *
65
+ >>>
66
+ >>> now = parse("Sat Oct 11 17:13:46 UTC 2003")
67
+ >>> today = now.date()
68
+ >>> year = rrule(YEARLY, dtstart=now, bymonth=8, bymonthday=13, byweekday=FR)[0].year
69
+ >>> rdelta = relativedelta(easter(year), today)
70
+ >>> print("Today is: %s" % today)
71
+ "Today is: 2003-10-11"
72
+ >>> print("Year with next Aug 13th on a Friday is: %s" % year)
73
+ "Year with next Aug 13th on a Friday is: 2004"
74
+ >>> print("How far is the Easter of that year: %s" % rdelta)
75
+ "How far is the Easter of that year: RelativeDelta(months=+6)"
76
+ >>> print("And the Easter of that year is: %s" % (today + rdelta))
77
+ "And the Easter of that year is: 2004-04-11"
78
+ ```
79
+
80
+ Being exactly 6 months ahead was **really** a coincidence :)
81
+
82
+ ## Contributing
83
+
84
+ We welcome many types of contributions - bug reports, pull requests (code, infrastructure or documentation fixes). For
85
+ more information about how to contribute to the project, see the `CONTRIBUTING.md` file in the repository.
86
+
87
+ ## Author
88
+
89
+ The dateutilx module is improved/re-written by rsb-23 in 2026.
90
+
91
+ ## License
92
+
93
+ All contributions after December 1, 2017 released under dual license -
94
+ either [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) or
95
+ the [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause). Contributions before December 1, 2017 - except
96
+ those those explicitly relicensed - are released only under the BSD 3-Clause License.
97
+
98
+
99
+ [license]: https://github.com/rsb-23/dateutilx/blob/main/LICENSE
100
+ [lint-badge]: https://github.com/rsb-23/dateutilx/actions/workflows/code-lint.yml/badge.svg
101
+ [tests-badge]: https://github.com/rsb-23/dateutilx/actions/workflows/code-test.yml/badge.svg
102
+
103
+ [license-badge]: https://img.shields.io/pypi/l/dateutilx.svg?style=flat-square
104
+ [pre-commit-badge]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
105
+ [py-version]: https://img.shields.io/pypi/pyversions/dateutilx
106
+ [pypi-downloads]: https://img.shields.io/pypi/dm/dateutilx?label=Downloads
107
+ [pypi-v]: https://img.shields.io/pypi/v/dateutilx?label=pypi
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
  name = "dateutilx"
7
7
  dynamic = ["version"]
8
8
  description = "Modern extension to the standard Python datetime module"
9
- readme = "README.rst"
9
+ readme = "README.md"
10
10
  license = { file = "LICENSE" }
11
11
  authors = [{ name = "Rishabh B" }]
12
12
 
@@ -18,7 +18,6 @@ classifiers = [
18
18
  "License :: OSI Approved :: Apache Software License",
19
19
  "Programming Language :: Python",
20
20
  "Programming Language :: Python :: 3",
21
- "Programming Language :: Python :: 3.10",
22
21
  "Programming Language :: Python :: 3.11",
23
22
  "Programming Language :: Python :: 3.12",
24
23
  "Programming Language :: Python :: 3.13",
@@ -27,7 +26,7 @@ classifiers = [
27
26
  "Topic :: Software Development :: Libraries",
28
27
  ]
29
28
 
30
- requires-python = ">=3.10"
29
+ requires-python = ">=3.11"
31
30
  dependencies = ["tzdata; sys_platform == 'win32'"]
32
31
 
33
32
  [dependency-groups]
@@ -37,21 +36,22 @@ test = ["hypothesis", "pytest", "pytest-cov"]
37
36
 
38
37
  [project.urls]
39
38
  Homepage = "https://github.com/rsb-23/dateutilx"
40
- Documentation = "https://dateutil.readthedocs.io/en/stable/"
39
+ Documentation = "https://dateutilx.readthedocs.io/en/stable/"
41
40
  Source = "https://github.com/rsb-23/dateutilx"
42
41
 
43
42
  # Build Config
44
43
  [tool.hatch.version]
45
44
  source = "vcs"
46
45
  [tool.hatch.build.targets.sdist]
47
- include = ["src/dateutilx", "src/dateutil", "LICENSE", "README.md", "pyproject.toml"]
46
+ include = ["src", "LICENSE", "README.md", "pyproject.toml"]
48
47
  [tool.hatch.build.targets.wheel]
49
- packages = ["src/dateutilx", "src/dateutil"]
48
+ packages = ["src"]
50
49
 
50
+ [tool.coverage.run]
51
+ source = ["src"]
51
52
  [tool.coverage.report]
52
53
  fail_under = 85.0
53
- [tool.coverage.run]
54
- source = ["src/"]
54
+ skip_covered = true
55
55
 
56
56
  [tool.pytest.ini_options]
57
57
  python_files = ["test_*.py", "*_test.py", "*_solution.py", ]
@@ -66,7 +66,7 @@ def easter(year, method: EasterAlgo | int = EasterAlgo.WESTERN):
66
66
  # e - Extra days to add for method 2 (converting Julian
67
67
  # date to Gregorian date)
68
68
 
69
- y = year
69
+ y = int(year)
70
70
  g = y % 19
71
71
  e = 0
72
72
  if method < 3:
@@ -90,4 +90,4 @@ def easter(year, method: EasterAlgo | int = EasterAlgo.WESTERN):
90
90
  p = i - j + e
91
91
  d = 1 + (p + 27 + (p + 6) // 40) % 31
92
92
  m = 3 + (p + 26) // 30
93
- return datetime.date(int(y), int(m), int(d))
93
+ return datetime.date(y, m, d)
@@ -0,0 +1,4 @@
1
+ from .constants import Day, Frequency, Month
2
+ from .funcs import is_windows_os
3
+
4
+ __all__ = ["Day", "Frequency", "Month", "is_windows_os"]
@@ -1,12 +1,7 @@
1
1
  import calendar
2
- import sys
3
2
  from enum import IntEnum
4
3
 
5
4
 
6
- def is_windows_os() -> bool:
7
- return sys.platform.startswith("win")
8
-
9
-
10
5
  class Frequency(IntEnum):
11
6
  YEARLY = 0
12
7
  MONTHLY = 1
@@ -0,0 +1,5 @@
1
+ import sys
2
+
3
+
4
+ def is_windows_os() -> bool:
5
+ return sys.platform.startswith("win")