I have similar SO question for date calculation for "Bussines days".
And finaly I use mechanism described here.
But this is the particular case.
What about more general approach?
How add specific number (n
) of days to current date considering only the days from custom set: Mn-Tu-We
or Sa-Su-Me
or any other.
Test data 1:
Date: (28-jun-2014).
Days to add: 10
Days type: Mn - Th - Fr
Answer: 21-july-2014
Test data 2:
Date: (28-jun-2014).
Days to add: 5
Days type: Tu - We
Answer: 15-july-2014