I have two dates. I would like to know a) the number of full months between the two dates and b) the number of days after subtracting the full months.
Essentially what DATEDIF(start_date, end_date, "m")
and DATEDIF(start_date, end_date, "md")
would do if entered as a formula in Google Sheets.
Example: Start date is 18 November 2015 End date is 3 March 2016
The number of full months between the two dates is 3. The number of days after subtracting the full months is 12 + 3 = 15.
Does anyone have a solution how to calculate this in Google Apps Script?