I use this code from another question:
private bool NthDayOfMonth(DateTime date, DayOfWeek dow, int n){
int d = date.Day;
return date.DayOfWeek == dow && (d-1)/7 == (n-1);
}
It works fine. But it not checks a last day ( for me it's when n = 5). How to modify it?
Thanks.