I am working on a perl script to determine the number of pay periods remaining until retirement. I can calculate the number of days between now and the retirement date, but I have not been able to determine how to determine how many calendar months there are between now and the date in the future. Since payday is on the 1st and the 15th, determining the number of pay periods remaining should be pretty easy once I know the number of calendar months in the interval specified.
I have scoured this web site and Stack Overflow. DateTime::Duration and Date::Calc had a lot of good guidance, and I used some of those packages to determine other useful data, but otherwise, I cannot find a solution to my problem.
Any guidance in determining the number of pay periods in an interval is greatly appreciated.