Skip to content

Commit

Permalink
Add comments about which day of the week is Monday
Browse files Browse the repository at this point in the history
  • Loading branch information
beyarkay committed Sep 21, 2023
1 parent 8c90420 commit 7aa984d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@ mod read {
.map(|res| Into::<RecurringShedding>::into(res.unwrap()))
.collect::<Vec<_>>();
} else if headers.iter().any(|h| h == "day_of_week") {
// Monday is day 1
raw = reader
.deserialize::<RawWeeklyShedding>()
.map(|res| Into::<RecurringShedding>::into(res.unwrap()))
Expand Down Expand Up @@ -1350,6 +1351,7 @@ mod tests {

#[test]
fn first_day_of_week() {
// Monday is 1
let start_dt = rfc3339("2022-01-01T00:00:00+02:00");
let finsh_dt = rfc3339("2022-02-01T00:00:00+02:00");
let dor = 1; // Sunday
Expand Down

0 comments on commit 7aa984d

Please sign in to comment.