C# subtract 1 day from current day only when weekdays
Posted on 2011-09-20
I have this line which subtracts 1 day from the current date (to populate a textbox):
How can I do the same but have it ignore weekend days? for example, on monday it would subtract 1 day but skip over sunday and saturday to return the value for friday.
In other words, how can I subtract 1 weekday from the current day.