Closed nmb10 closed 5 years ago
Hi. Thanks for useful lib. This PR fixes some incorrect russian cases:
Correct format for (2, 3, 4) cases: before fix:
>>> for_days_ago = date + datetime.timedelta(days=4.5) >>> print(timeago.format(date, four_days_ago, locale)) '4 дней назад' # Not correct.
after fix:
>>> print(timeago.format(date, four_days_ago, locale)) '4 дня назад' # Correct
The same way for minutes, hours, weeks, months and years.
Correct format for (21, 31, 41 ... ) cases before fix:
>>> twenty_one_minutes_ago = date + datetime.timedelta(minutes=21) >>> print(timeago.format(date, twenty_one_minutes_ago, locale)) '21 минут назад' # Not correct.
>>> print(timeago.format(date, twenty_one_minutes_ago, locale)) '21 минуту назад' # Correct
The same way for seconds, hours and years.
Thanks.
Hey,
I merged and released a new version (1.0.10) :tada:
Thank you very much for your time :+1: :ru: :+1:
Hi. Thanks for useful lib. This PR fixes some incorrect russian cases:
Correct format for (2, 3, 4) cases: before fix:
after fix:
The same way for minutes, hours, weeks, months and years.
Correct format for (21, 31, 41 ... ) cases before fix:
after fix:
The same way for seconds, hours and years.
Thanks.