This task was asked me to complete in 2018. At that time, I had done it with .NET Framework 4.7 and Microsoft Test Framework but, I decided to upgrade .NET Core, XUnit Framework, and FluentAssertions library.
This small application calculates the salary payment date according to the given parameters that you can find below.
SpecificDayOfMonth, // nth day of month.
FirstWorkingDayOfMonth, // first working day of month
DayBeforeLastWorkingDay, // day before last working day of month
LastWorkingDayOfMonth, // last working day of month
FirstXDay, // first x day of month. ie. if day is 2, it means first tuesday of month
LastXDay, // last x day of month. ie. if day is 1, it means last monday of month