summaryrefslogtreecommitdiff
path: root/src/yearinfo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/yearinfo.rs')
-rw-r--r--src/yearinfo.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/yearinfo.rs b/src/yearinfo.rs
index 8d7fd4b..9bc0906 100644
--- a/src/yearinfo.rs
+++ b/src/yearinfo.rs
@@ -3,6 +3,21 @@ use crate::options::*;
use chrono::prelude::*;
use chrono::DateTime;
+
+#[derive(Debug)]
+pub struct YearInfo {
+ pub yearlen: usize,
+ pub nextyearlen: usize,
+ pub yearordinal: isize,
+ pub yearweekday: usize,
+ pub mmask: Vec<usize>,
+ pub mrange: Vec<usize>,
+ pub mdaymask: Vec<isize>,
+ pub nmdaymask: Vec<isize>,
+ pub wdaymask: Vec<usize>,
+ pub wnomask: Option<Vec<usize>>,
+}
+
fn is_leap_year(year: i32) -> bool {
year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)
}