use chrono::{DateTime, NaiveDate, NaiveDateTime, NaiveTime, Utc}; use once_cell::sync::Lazy; use regex::Regex; use std::path::Path; /// Regex for extracting date and optional time from file names. /// Format: YYYYMMDD or YYYYMMDD-HHMMSS (time can be 4-6 digits) static FILE_NAME_REGEX: Lazy = Lazy::new(|| Regex::new(r"^(?P\d{8})(?:-(?P