fix: month calculation
This commit is contained in:
parent
f030083266
commit
7deedad351
@ -15,6 +15,7 @@ def age_as_hr_string(age: datetime.timedelta) -> str:
|
||||
months = age.days/30
|
||||
years = age.days/365
|
||||
if years >= 1:
|
||||
months = months - 12*years
|
||||
return f'{years:.0f} Jahr{pluralize(years)} und {months:.0f} Monat{pluralize(months)}'
|
||||
elif months >= 3:
|
||||
return f'{months:.0f} Monat{pluralize(months)}'
|
||||
|
Loading…
Reference in New Issue
Block a user