mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-06-03 18:24:12 +02:00
better private text
This commit is contained in:
parent
ffb230045c
commit
b74b145380
1 changed files with 3 additions and 1 deletions
|
|
@ -175,8 +175,10 @@ impl Demo {
|
||||||
if let Some(private_until) = self.private_until {
|
if let Some(private_until) = self.private_until {
|
||||||
let now = OffsetDateTime::now_utc();
|
let now = OffsetDateTime::now_utc();
|
||||||
let days = (private_until - now).whole_days();
|
let days = (private_until - now).whole_days();
|
||||||
if days <= 1 {
|
if days < 1 {
|
||||||
"by tomorrow".into()
|
"by tomorrow".into()
|
||||||
|
} else if days < 2 {
|
||||||
|
"in 1 day".into()
|
||||||
} else {
|
} else {
|
||||||
format!("in {days} days").into()
|
format!("in {days} days").into()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue