Tweak calendar borders

This commit is contained in:
2021-05-06 20:10:50 +02:00
parent b4a68cdb3b
commit c9a217f0ea

View File

@ -352,14 +352,9 @@ where
let month = day.month();
let month_border = |other_day| match days.get(&other_day) {
Some(_) => other_day.month() != month,
None => true,
};
let month_or_week_border = |other_day| match days.get(&other_day) {
Some(_) => other_day.iso_week() != week || month_border(other_day),
None => true,
let month_border = |other_day: Date<_>| other_day.month() != month;
let month_or_week_border = |other_day: Date<_>| {
other_day.iso_week() != week || month_border(other_day)
};
const MIN_WEIGHT: f32 = 0.5;
@ -378,7 +373,6 @@ where
duration,
};
//(day.weekday(), Some(ctx))
Some(ctx)
})
.collect()