public int CurrentWeek() { var weekKey = SeasonScheduler.WeekKey(GetDate()); var weekStr = weekKey.Substring(5, 2); return(Int32.Parse(weekStr)); }
public Schedule CreateSchedule(Schedule initial, Season season) { ScheduleRules.ToList().ForEach(rule => { initial = SeasonScheduler.CreateGamesByRule(rule, season); }); return(initial); }
private void SetSchedule() { Logger.Debug("Setting the Schedule"); Season = CurrentSeason(); Logger.Debug($"Season={Season}"); SeasonScheduler = new SeasonScheduler(); ScheduleAvailable = SeasonScheduler.ScheduleAvailable(Season); if (!ScheduleAvailable) { return; } SeasonStarts = SeasonScheduler.SeasonStarts(Season); RegularSeasonEnds = SeasonScheduler.RegularSeasonEnds(Season); }
private void SetSchedule() { Logger.Debug("Setting the Schedule"); Season = CurrentSeason(); Logger.Debug($"Season={Season}"); SeasonScheduler = new SeasonScheduler(); ScheduleAvailable = SeasonScheduler.ScheduleAvailable(Season); if (!ScheduleAvailable) { Logger.Debug($"Season={Season} schedule not available"); return; } SeasonStarts = SeasonScheduler.SeasonStarts(Season); Logger.Debug($"Season={Season} starts {SeasonStarts}"); RegularSeasonEnds = SeasonScheduler.RegularSeasonEnds(Season); Logger.Debug($"regular Season={Season} ends {RegularSeasonEnds}"); Week = $"{CurrentWeek():0#}"; }