This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
It might seem a silly question, but how do you define 'date of the previous month'.
It seems to be easy, i.e.: you take the 15th of July, and the previous month it was the 15th of June. But what do you do on 30th March? Do you want the last day of February? Do you want to substract 30 days?
There are different definitions for 'month' in financial sector, and in law.
I found this 30-days solution (but didn't test it for critical dates):