Add header to multiyear groups.
E.g. "2018 - 20" or "1989 - 2003".
This commit is contained in:
parent
8cedcd8ce9
commit
2f251bf8e2
@ -64,8 +64,14 @@ impl PhotoLink {
|
||||
)
|
||||
}
|
||||
} else {
|
||||
let (from_year, to_year) = (from.year(), to.year());
|
||||
let to_year = if from_year / 100 == to_year / 100 {
|
||||
to_year % 100
|
||||
} else {
|
||||
to_year
|
||||
};
|
||||
(
|
||||
None,
|
||||
Some(format!("{} - {}", from_year, to_year)),
|
||||
format!(
|
||||
"{} - {} ({})",
|
||||
from.format("%F"),
|
||||
|
Loading…
Reference in New Issue
Block a user