Skip to content
Loading
  • Amit Gupta
    0
    If you want weekly days then you can AddDays(7) to start date that gives exact output date
    0
  • 0
    Thanks for your response. Where do I AddDays(7) to start date ? 
    0
  • 0
    Hi Amit
     
    Thanks. I have got the code working excluding weekends. All I have to do now is filter out the holidays. 
    for (int i = 0; i < ts.Days; i += 7)
    {
    dates.Add(new WeekStartEnd() { Monday = firstMonday.AddDays(i), Sunday = firstMonday.AddDays(i + 9) });
    }
     
    0