0

Is there any way to ignore weekends easily during date calculation like the microsoft project does, rather using hard code to skip the days.

GoldenView
  • 57
  • 1
  • 5
  • Does this answer your question? [AddBusinessDays and GetBusinessDays](https://stackoverflow.com/questions/1044688/addbusinessdays-and-getbusinessdays) – KennetsuR Jul 20 '22 at 00:42
  • 1
    Could you please share what exactly you are trying to implement, it would be great if you could include a few snippets regarding your current context. – Md Farid Uddin Kiron Jul 20 '22 at 00:46

1 Answers1

0

You can use the Fluent DateTime library easily. Please refer to this Github library repository. https://github.com/FluentDateTime/FluentDateTime

var dateTime = DateTime.Now.AddBusinessDays(5);

You can consider weekdays as BusinessDays

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
csandun
  • 374
  • 2
  • 9