Skip to content

Commit f071ed3

Browse files
authored
Merge pull request #692 from sdispater/fix/diff-tests-for-date
Fix diff tests for dates
2 parents 74cc9fd + 8ebab74 commit f071ed3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pendulum/date.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def is_anniversary(self, dt: date | None = None) -> bool:
173173
Compares the date/month values of the two dates.
174174
"""
175175
if dt is None:
176-
dt = Date.today()
176+
dt = self.__class__.today()
177177

178178
instance = self.__class__(dt.year, dt.month, dt.day)
179179

tests/date/test_diff.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
@pytest.fixture
1111
def today():
12-
return pendulum.today().date()
12+
return pendulum.Date.today()
1313

1414

1515
def test_diff_in_years_positive():

0 commit comments

Comments
 (0)