mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Fix compiler warnings
This commit is contained in:
parent
f02515fda2
commit
7af71ec480
12 changed files with 21 additions and 23 deletions
|
|
@ -104,12 +104,9 @@ proc getTweetTime*(tweet: Tweet): string =
|
|||
|
||||
proc getShortTime*(tweet: Tweet): string =
|
||||
let now = now()
|
||||
var then = tweet.time.local()
|
||||
then.utcOffset = 0
|
||||
let since = now - tweet.time
|
||||
|
||||
let since = now - then
|
||||
|
||||
if now.year != then.year:
|
||||
if now.year != tweet.time.year:
|
||||
result = tweet.time.format("d MMM yyyy")
|
||||
elif since.inDays >= 1:
|
||||
result = tweet.time.format("MMM d")
|
||||
|
|
|
|||
Loading…
Reference in a new issue