forked from Ruderverein-Donau-Linz/rowt
show 6 (instead of 7) days for normal user
This commit is contained in:
parent
0b961ca1b8
commit
769bc7f177
@ -29,10 +29,11 @@ async fn index(db: &State<SqlitePool>, user: User, flash: Option<FlashMessage<'_
|
||||
let end_of_year = NaiveDate::from_ymd_opt(Local::now().year(), 12, 31).unwrap();
|
||||
show_next_n_days = end_of_year
|
||||
.signed_duration_since(Local::now().date_naive())
|
||||
.num_days();
|
||||
.num_days()
|
||||
+ 1;
|
||||
}
|
||||
|
||||
for i in 0..show_next_n_days + 1 {
|
||||
for i in 0..show_next_n_days {
|
||||
let date = (Local::now() + Duration::days(i)).date_naive();
|
||||
days.push(Day::new(db, date).await);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user