Export result to txt/docx

This commit is contained in:
2026-01-13 21:08:24 +02:00
parent e9ca378099
commit 4b49b4b54e
6 changed files with 265 additions and 25 deletions

View File

@@ -128,6 +128,36 @@ pub enum ShiftPosition {
Second,
}
pub fn weekday_to_greek(weekday: Weekday) -> &'static str {
match weekday {
Weekday::Mon => "Δευτέρα",
Weekday::Tue => "Τρίτη",
Weekday::Wed => "Τετάρτη",
Weekday::Thu => "Πέμπτη",
Weekday::Fri => "Παρασκευή",
Weekday::Sat => "Σάββατο",
Weekday::Sun => "Κυριακή",
}
}
pub fn month_to_greek(month: u32) -> &'static str {
match month {
1 => "Ιανουάριος",
2 => "Φεβρουάριος",
3 => "Μάρτιος",
4 => "Απρίλιος",
5 => "Μάιος",
6 => "Ιούνιος",
7 => "Ιούλιος",
8 => "Αύγουστος",
9 => "Σεπτέμβριος",
10 => "Οκτώβριος",
11 => "Νοέμβριος",
12 => "Δεκέμβριος",
_ => panic!("Unable to find translation for month {}", month),
}
}
#[cfg(test)]
mod tests {
use rstest::rstest;