fix export with the new format of hours used

This commit is contained in:
Mylloon 2022-09-19 23:13:07 +02:00
parent 54ce39d69e
commit afe6aca93f
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -236,7 +236,8 @@ pub fn build(timetable: T, dates: D) -> Vec<models::Course> {
// h1 => heure de début | m1 => minute de début // h1 => heure de début | m1 => minute de début
// h2 => heure de fin | m2 => minute de fin // h2 => heure de fin | m2 => minute de fin
let re = let re =
Regex::new(r"(?P<h1>\d{1,2})h(?P<m1>\d{1,2})?.(?P<h2>\d{1,2})h(?P<m2>\d{1,2})?").unwrap(); Regex::new(r"(?P<h1>\d{1,2})(h|:)(?P<m1>\d{1,2})?.(?P<h2>\d{1,2})(h|:)(?P<m2>\d{1,2})?")
.unwrap();
for hour in timetable.0 { for hour in timetable.0 {
let captures = re.captures(&hour).unwrap(); let captures = re.captures(&hour).unwrap();