Days together
sub to-date(Str $_) {
Date.new(:2022year, :month(.[1]), :day(.[0])) given .comb: /\d+/
}
for [
('12-01','20-01','15-01','18-01'),
('02-03','12-03','13-03','14-03'),
('02-03','12-03','11-03','15-03'),
('30-03','05-04','28-03','02-04'),
]».&to-date -> ($s1, $e1, $s2, $e2) {
say +(($s1 .. $e1) ∩ ($s2 .. $e2))
}INFO