Skip to content

Commit

Permalink
✨ add family day to special days (duck-dynasty#1068)
Browse files Browse the repository at this point in the history
  • Loading branch information
twentylemon authored Feb 17, 2025
1 parent 35780a3 commit 33e2772
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion duckbot/cogs/announce_day/special_days.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import date, datetime

import discord
from dateutil.relativedelta import FR, SU
from dateutil.relativedelta import FR, MO, SU
from dateutil.relativedelta import relativedelta as rd
from holidays.countries import CA

Expand All @@ -28,6 +28,7 @@ def _populate(self, year):
self[date(year, 1, 31)] = f"Erin and Taras' Anniversary. It's been {year-2010} entire years"
self[date(year, 2, 2)] = "Groundhog Day"
self[date(year, 2, 14)] = "Valentine's Day"
self[date(year, 2, 1) + rd(weekday=MO(+3))] = "Family Day"
self[date(year, 3, 9)] = f"Lachlan's Birthday. He is {year-1989} years old. All hail this magnificent and unsurpassed achievement in longevity. Glory be unto him"
self[date(year, 3, 14)] = f"Pi Day ({math.pi}). Celebrate by eating half of a pie"
self[date(year, 3, 17)] = "St. Patrick's Day"
Expand Down
6 changes: 6 additions & 0 deletions tests/cogs/announce_day/special_days_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ def test_populate_duckbot_day(now, bot, time, seconds):
now.return_value = time
clazz = SpecialDays(bot)
assert clazz.get_list(time) == [f"DuckBot's Inception Day. I'm about {seconds}s old"]


@pytest.mark.parametrize("date", [datetime(2024, 2, 19), datetime(2025, 2, 17), datetime(2026, 2, 16)])
def test_populate_family_day(bot, date):
clazz = SpecialDays(bot)
assert clazz.get_list(date) == ["Family Day"]

0 comments on commit 33e2772

Please sign in to comment.