Show time of email >1 week
This commit is contained in:
parent
f6c1835b18
commit
6251c54873
@ -47,7 +47,7 @@ iframe {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.index .date {
|
||||
width: 6em;
|
||||
width: 7em;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@ -490,15 +490,15 @@ fn human_age(timestamp: i64) -> String {
|
||||
let age = now - ts;
|
||||
let weekday = now.weekday();
|
||||
let datetime = if age < Duration::minutes(1) {
|
||||
format!("{} ago", age.num_seconds())
|
||||
format!("{} min. ago", age.num_seconds())
|
||||
} else if age < Duration::hours(1) {
|
||||
format!("{} ago", age.num_minutes())
|
||||
format!("{} min. ago", age.num_minutes())
|
||||
} else if age < Duration::days(1) {
|
||||
ts.format("%H:%M").to_string()
|
||||
} else if age < Duration::weeks(1) {
|
||||
ts.format("%a %H:%M").to_string()
|
||||
} else {
|
||||
ts.format("%b %e").to_string()
|
||||
ts.format("%b %e %H:%M").to_string()
|
||||
};
|
||||
info!("dateime {datetime} TZ: {}", ts.offset());
|
||||
datetime
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user