rustolio_utils/time/calendar/week.rs
1//
2// SPDX-License-Identifier: MPL-2.0
3//
4// Copyright (c) 2026 Tobias Binnewies. All rights reserved.
5//
6// This Source Code Form is subject to the terms of the Mozilla Public
7// License, v. 2.0. If a copy of the MPL was not distributed with this
8// file, You can obtain one at http://mozilla.org/MPL/2.0/.
9//
10
11use super::super::Weekday;
12
13#[derive(Debug, Clone, Copy, PartialEq, Eq)]
14pub struct CalendarWeek {
15 pub week: u8,
16 pub days: [(u8, bool); 7],
17 starting_weekday: Weekday,
18}
19
20impl CalendarWeek {
21 pub(super) const fn new(week: u8, days: [(u8, bool); 7], starting_weekday: Weekday) -> Self {
22 Self {
23 week,
24 days,
25 starting_weekday,
26 }
27 }
28
29 pub const fn week(&self) -> u8 {
30 self.week
31 }
32}