I’ve tried to find a good set of function modules to add/subtract months to/from dates. I’ve not find none that appealed me.Then I decided to search for classes, and I found CL_HRPT_DATE_TOOLS. It’s an awesome piece of simplicity, I want not to forget. Because that, I will leave here some considerations of use. I doubt it will be useful for you, except if you are me reading this post in the future (Did I make a good use of it? If I didn’t, please, update this post. Thanks. No prob, mate).
– the count parameter used in its methods is an INT4 variable. Please keep it in mind or the program will crash (or not compile)
– the units to be used are PT_ZEINH variables… its values to be used are ‘010’ to ‘013’ (day, week, month, year)
– you can use literals to inform them, but the class has four attributes to keep them easy to use/get: UNIT_DAY, UNIT_WEEK, UNIT_MONTH, UNIT_YEAR
I’m not sure about the functionality of the methods CALC_PERIOD_BEGIN and CALC_PERIOD_END, but I’ve find too useful the methods ADD_DATE and SUBTRACT_DATE.