예제 #1
0
        public IEnumerable <DateTime> In(int year)
        {
            var dates = new List <DateTime>();

            switch (_state)
            {
            case State.WA:
                dates.Add(_dateOfMonthCalculator.Find(Ordinal.First, DayOfWeek.Monday).In(Month.March).For(year));
                break;

            case State.TAS:
            case State.VIC:
                dates.Add(_dateOfMonthCalculator.Find(Ordinal.Second, DayOfWeek.Monday).In(Month.March).For(year));
                break;

            case State.QLD:
            case State.NT:
                dates.Add(_dateOfMonthCalculator.Find(Ordinal.First, DayOfWeek.Monday).In(Month.May).For(year));
                break;

            case State.NSW:
            case State.ACT:
            case State.SA:
                dates.Add(_dateOfMonthCalculator.Find(Ordinal.First, DayOfWeek.Monday).In(Month.October).For(year));
                break;
            }

            return(dates);
        }
예제 #2
0
        public IEnumerable <DateTime> In(int year)
        {
            var dates = new List <DateTime>();

            switch (_state)
            {
            case State.WA:
                var firstMondayInOctober = _dateOfMonthCalculator.Find(Ordinal.First, DayOfWeek.Monday).In(Month.October).For(year);
                var lastDayOfSeptember   = new DateTime(year, 9, 30);
                dates.Add(!lastDayOfSeptember.IsWeekend()
                        ? firstMondayInOctober.AddDays(-7)
                        : firstMondayInOctober);
                break;

            case State.QLD:
                dates.Add(_dateOfMonthCalculator.Find(Ordinal.First, DayOfWeek.Monday).In(Month.October).For(year));
                break;

            case State.ACT:
            case State.NSW:
            case State.NT:
            case State.SA:
            case State.TAS:
            case State.VIC:
                dates.Add(_dateOfMonthCalculator.Find(Ordinal.Second, DayOfWeek.Monday).In(Month.June).For(year));
                break;
            }

            return(dates);
        }
예제 #3
0
 public IEnumerable <DateTime> In(int year)
 {
     return(new List <DateTime>
     {
         _dateOfMonthCalculator.Find(Ordinal.First, DayOfWeek.Tuesday).In(Month.November).For(year)
     });
 }
예제 #4
0
 public IEnumerable <DateTime> In(int year)
 {
     return(new List <DateTime>
     {
         _dateOfMonthCalculator.Find(Ordinal.Second, DayOfWeek.Monday).In(Month.March).For(year)
     });
 }