diff --git a/web/index.html b/web/index.html
index ef4ab30..6e5a53c 100644
--- a/web/index.html
+++ b/web/index.html
@@ -47,7 +47,7 @@ iframe {
white-space: nowrap;
}
.index .date {
- width: 7em;
+ width: 10em;
white-space: nowrap;
text-align: right;
}
diff --git a/web/src/lib.rs b/web/src/lib.rs
index 79f3196..ea99b60 100644
--- a/web/src/lib.rs
+++ b/web/src/lib.rs
@@ -7,7 +7,7 @@ use std::{
hash::{Hash, Hasher},
};
-use chrono::{DateTime, Duration, Local, Utc};
+use chrono::{DateTime, Datelike, Duration, Local, Utc};
use graphql_client::GraphQLQuery;
use itertools::Itertools;
use log::{debug, error, info, Level};
@@ -708,8 +708,10 @@ fn human_age(timestamp: i64) -> String {
ts.format("Yest. %H:%M").to_string()
} else if age < Duration::weeks(1) {
ts.format("%a %H:%M").to_string()
+ } else if ts.year() == now.year() {
+ ts.format("%b %d %H:%M").to_string()
} else {
- ts.format("%b %e %H:%M").to_string()
+ ts.format("%b %d, %Y %H:%M").to_string()
};
datetime
}