"day" vs "days" in brithday.py
This commit is contained in:
parent
c79bd6d0ba
commit
746f08b5a8
1 changed files with 5 additions and 4 deletions
|
@ -70,15 +70,16 @@ class Module(ModuleManager.BaseModule):
|
|||
if next_birthday < now:
|
||||
next_birthday = next_birthday.replace(year=next_birthday.year+1)
|
||||
days = (next_birthday-now).days
|
||||
days_str = "day" if days == 1 else "days"
|
||||
age = next_birthday.year-birthday_parsed.year
|
||||
|
||||
if days > 0:
|
||||
if years:
|
||||
event["stdout"].write("%s is %d in %d days" % (
|
||||
target_user.nickname, age, days))
|
||||
event["stdout"].write("%s is %d in %d %s" % (
|
||||
target_user.nickname, age, days, days_str))
|
||||
else:
|
||||
event["stdout"].write("%s birthday is in %d days" % (
|
||||
_apostrophe(target_user.nickname), days))
|
||||
event["stdout"].write("%s birthday is in %d %s" % (
|
||||
_apostrophe(target_user.nickname), days, days_str))
|
||||
else:
|
||||
if years:
|
||||
event["stdout"].write("%s is %d today! 🎉" % (
|
||||
|
|
Loading…
Reference in a new issue