Skip to content
Snippets Groups Projects

Dávky okolo feedbacku

Closed Martin Mareš requested to merge mj/upload-feedback into master
1 file
+ 9
0
Compare changes
  • Side-by-side
  • Inline
+ 9
0
@@ -15,6 +15,15 @@ def inflect_number(n: int, w1: str, w234: str, wother: str, unitprefix: str = ''
return f'{n} {unitprefix}{wother}'
def inflect_by_number(n: int, w1: str, w234: str, wother: str, unitprefix: str = '') -> str:
if n == 1:
return f'{unitprefix}{w1}'
elif 2 <= n <= 4:
return f'{unitprefix}{w234}'
else:
return f'{unitprefix}{wother}'
def timeformat(dt: datetime) -> str:
if dt is None:
return ''
Loading