AI Implementation feature(1090): Mastodon Post Composition and Publishing 1.00 (#7)
This commit was merged in pull request #7.
This commit is contained in:
@@ -90,12 +90,16 @@ def _is_unpublished(metadata: dict) -> bool:
|
||||
|
||||
|
||||
def _matches_anniversary(post_date: date, target_year: int, today: date) -> bool:
|
||||
if post_date.year != target_year:
|
||||
return False
|
||||
if post_date.month == 2 and post_date.day == 29:
|
||||
if _is_leap_year(today.year):
|
||||
return today.month == 2 and today.day == 29
|
||||
return today.month == 3 and today.day == 1
|
||||
return (
|
||||
post_date.year == target_year
|
||||
and today.month == 3
|
||||
and today.day == 1
|
||||
)
|
||||
if post_date.year != target_year:
|
||||
return False
|
||||
return post_date.month == today.month and post_date.day == today.day
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user