The plurals in the English language always get you
This commit is contained in:
parent
ea6ced889c
commit
dc7e9fda31
1 changed files with 4 additions and 2 deletions
|
|
@ -138,10 +138,12 @@ when defined(js):
|
||||||
let diff = latestTime - prevPost.info.creation.fromUnix()
|
let diff = latestTime - prevPost.info.creation.fromUnix()
|
||||||
if diff.weeks > 48:
|
if diff.weeks > 48:
|
||||||
let years = diff.weeks div 48
|
let years = diff.weeks div 48
|
||||||
diffStr = $years & " years later"
|
diffStr = $years
|
||||||
|
diffStr.add(if years == 1: " year later" else: " years later")
|
||||||
elif diff.weeks > 4:
|
elif diff.weeks > 4:
|
||||||
let months = diff.weeks div 4
|
let months = diff.weeks div 4
|
||||||
diffStr = $months & " months later"
|
diffStr = $months
|
||||||
|
diffStr.add(if months == 1: " month later" else: " months later")
|
||||||
else:
|
else:
|
||||||
return buildHtml(tdiv())
|
return buildHtml(tdiv())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue