28 public static Func<DateTime, CalendarInfo>
Weekly
43 public static Func<DateTime, CalendarInfo>
Monthly
49 var start = dt.AddDays(1 - dt.Day).Date;
59 public static Func<DateTime, CalendarInfo>
Quarterly
65 var nthQuarter = (dt.Month - 1) / 3;
66 var firstMonthOfQuarter = nthQuarter * 3 + 1;
67 var start =
new DateTime(dt.Year, firstMonthOfQuarter, 1);
77 public static Func<DateTime, CalendarInfo>
Yearly
83 var start = dt.AddDays(1 - dt.DayOfYear).Date;
99 public DateTime
Start {
get; init; }
127 return $
"{Start} {Period}";
140 return Start == other.Start &&
Period == other.Period;
150 var hashCode =
Start.GetHashCode();
151 return (hashCode * 397) ^
Period.GetHashCode();
161 return left.
Equals(right);
170 return !(left == right);