fix: print time suffix only for relative dates
This commit is contained in:
parent
c1c867a5ff
commit
8bed342a6d
1 changed files with 6 additions and 4 deletions
|
@ -892,11 +892,13 @@ pub fn time(created: f64) -> (String, String) {
|
|||
format!("{}m", time_delta.whole_minutes())
|
||||
};
|
||||
|
||||
if time_delta <= Duration::days(30) {
|
||||
if OffsetDateTime::now_utc() < time {
|
||||
rel_time += " left";
|
||||
} else {
|
||||
rel_time += " ago";
|
||||
}
|
||||
}
|
||||
|
||||
(
|
||||
rel_time,
|
||||
|
|
Loading…
Reference in a new issue