libtad_models/date_calculator/period.rs
1use super::{BusinessHoliday, Weekdays};
2use crate::time::Time;
3use serde::Deserialize;
4
5#[derive(Debug, Deserialize)]
6/// Calculated results for a requested period.
7pub struct Period {
8 /// Number of days calculated.
9 pub includeddays: i32,
10
11 /// Number of calendar days in calculated period.
12 pub calendardays: i32,
13
14 /// Number of days which was skipped in the calculated period.
15 pub skippeddays: i32,
16
17 /// The date the calculation started from.
18 pub startdate: Time,
19
20 /// The date the calculation ended on.
21 pub enddate: Time,
22
23 /// The spread of excluded or included weekdays in includdeddays.
24 pub weekdays: Weekdays,
25
26 /// Holidays which occur in the requested period.
27 pub holidays: BusinessHoliday,
28}