Skip to content

DayOfWeek uses 1-7 for Sun-Sat #19

@smoelius

Description

@smoelius

The DayOfWeek implementation expects 1-7 to represent Sun-Sat:

/// A day of the week, 1-7 (Sun-Sat)
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct DayOfWeek(chrono::Weekday);
impl Sealed for DayOfWeek {}
impl ExprValue for DayOfWeek {
const MAX: u8 = 7;
const MIN: u8 = 1;
fn max() -> Self {
Self(chrono::Weekday::Sat)
}
fn min() -> Self {
Self(chrono::Weekday::Sun)
}
}

But many Cron sources (e.g., this one) say that 1-7 should represent Mon-Sun, and that 0 should be an additional representation for Sunday.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions