|
@ -20,7 +20,7 @@ def kratke_datum(dt): |
|
|
now = tz.localize(naive_now) |
|
|
now = tz.localize(naive_now) |
|
|
delta = now - dt |
|
|
delta = now - dt |
|
|
if delta <= timedelta(days=1): |
|
|
if delta <= timedelta(days=1): |
|
|
return dt.strftime("%k:%M") |
|
|
return dt.strftime("%H:%M") |
|
|
if delta <= timedelta(days=365): # Timedelta neumí vyjádřit 1 rok |
|
|
if delta <= timedelta(days=365): # Timedelta neumí vyjádřit 1 rok |
|
|
return dt.strftime("%d. %m.") |
|
|
return dt.strftime("%d. %m.") |
|
|
return dt.strftime("%d. %m. %Y") |
|
|
return dt.strftime("%d. %m. %Y") |
|
|