dycw-utilities 0.138.0__py3-none-any.whl → 0.138.1__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.
- {dycw_utilities-0.138.0.dist-info → dycw_utilities-0.138.1.dist-info}/METADATA +1 -1
- {dycw_utilities-0.138.0.dist-info → dycw_utilities-0.138.1.dist-info}/RECORD +6 -6
- utilities/__init__.py +1 -1
- utilities/whenever.py +14 -0
- {dycw_utilities-0.138.0.dist-info → dycw_utilities-0.138.1.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.138.0.dist-info → dycw_utilities-0.138.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
utilities/__init__.py,sha256
|
1
|
+
utilities/__init__.py,sha256=Bd8dTrqjGxNQ6TwkIs-2waHukZTqr0rukeUuyCgkrj4,60
|
2
2
|
utilities/aiolimiter.py,sha256=mD0wEiqMgwpty4XTbawFpnkkmJS6R4JRsVXFUaoitSU,628
|
3
3
|
utilities/altair.py,sha256=HeZBVUocjkrTNwwKrClppsIqgNFF-ykv05HfZSoHYno,9104
|
4
4
|
utilities/asyncio.py,sha256=dcGeKQzjLBXxKzZkVIk5oZsFXEcynVbRB9iNB5XEDZk,38526
|
@@ -85,10 +85,10 @@ utilities/tzlocal.py,sha256=KyCXEgCTjqGFx-389JdTuhMRUaT06U1RCMdWoED-qro,728
|
|
85
85
|
utilities/uuid.py,sha256=32p7DGHGM2Btx6PcBvCZvERSWbpupMXqx6FppPoSoTU,612
|
86
86
|
utilities/version.py,sha256=ufhJMmI6KPs1-3wBI71aj5wCukd3sP_m11usLe88DNA,5117
|
87
87
|
utilities/warnings.py,sha256=un1LvHv70PU-LLv8RxPVmugTzDJkkGXRMZTE2-fTQHw,1771
|
88
|
-
utilities/whenever.py,sha256=
|
88
|
+
utilities/whenever.py,sha256=R5d9UCNCdAOyjwLUmfH2Vn8Ykee8OHQi2skRTFfbZMM,20492
|
89
89
|
utilities/zipfile.py,sha256=24lQc9ATcJxHXBPc_tBDiJk48pWyRrlxO2fIsFxU0A8,699
|
90
90
|
utilities/zoneinfo.py,sha256=oEH-nL3t4h9uawyZqWDtNtDAl6M-CLpLYGI_nI6DulM,1971
|
91
|
-
dycw_utilities-0.138.
|
92
|
-
dycw_utilities-0.138.
|
93
|
-
dycw_utilities-0.138.
|
94
|
-
dycw_utilities-0.138.
|
91
|
+
dycw_utilities-0.138.1.dist-info/METADATA,sha256=50rXKdwfhrNV9nMtdxwwleIHXmBFm3v6rTZxopeRnV0,1637
|
92
|
+
dycw_utilities-0.138.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
93
|
+
dycw_utilities-0.138.1.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
|
94
|
+
dycw_utilities-0.138.1.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/whenever.py
CHANGED
@@ -25,6 +25,7 @@ from whenever import (
|
|
25
25
|
PlainDateTime,
|
26
26
|
Time,
|
27
27
|
TimeDelta,
|
28
|
+
YearMonth,
|
28
29
|
ZonedDateTime,
|
29
30
|
)
|
30
31
|
|
@@ -670,6 +671,18 @@ def to_zoned_date_time(
|
|
670
671
|
##
|
671
672
|
|
672
673
|
|
674
|
+
def two_digit_year_month(year: int, month: int, /) -> YearMonth:
|
675
|
+
"""Construct a year-month from a 2-digit year."""
|
676
|
+
min_year = DATE_TWO_DIGIT_YEAR_MIN.year
|
677
|
+
max_year = DATE_TWO_DIGIT_YEAR_MAX.year
|
678
|
+
years = range(min_year, max_year + 1)
|
679
|
+
(year_use,) = (y for y in years if y % 100 == year)
|
680
|
+
return YearMonth(year_use, month)
|
681
|
+
|
682
|
+
|
683
|
+
##
|
684
|
+
|
685
|
+
|
673
686
|
class WheneverLogRecord(LogRecord):
|
674
687
|
"""Log record powered by `whenever`."""
|
675
688
|
|
@@ -774,4 +787,5 @@ __all__ = [
|
|
774
787
|
"to_local_plain",
|
775
788
|
"to_nanos",
|
776
789
|
"to_zoned_date_time",
|
790
|
+
"two_digit_year_month",
|
777
791
|
]
|
File without changes
|
File without changes
|