double FindActiveDay(double ts, int searchdir) { //Will never be active. if (Weekdays.NoneSelected() && !(RedLetterDays && !ExludeRedLetterDays)) { return(double.NaN); } //Work backwards until we find the last active day. while (!IsActive(ts)) { ts += 24 * 60 * 60 * searchdir; } return(SimulationTime.GetTimestampForDay(ts)); }
public void UpdateTimePropterties() { Day = SimulationTime.GetDayOfWeek(0); TimestampOfDay = SimulationTime.GetTimestampForDay(0); }