Starting Date
 Ending Date (relative future)

Computing The Date N Days In The Past Or Future Given any arbitrary starting date and calendar mode (ymdA, CalMode), we may want to know what the ending calendar date (ISOymdB) was or will be (±N) in the relative past or future. To do this, we combine the JD computation function with the inverse JD function.
Algorithm 8:
Given starting date and calendar mode (ISOymdA, CalMode), compute the calendar date (ISOymdB) ±N day(s) in relative past or future. JDA = JD_For_ISOymd (ISOymdA, CalMode) JDB = JDA + N ISOymdB = ISOymd_For_JD (JDB, CalMode) EXAMPLE: Given the starting date of July 4th, 1776 (Gregorian), what was the calendar date exactly (N = 10987) days later? CalMode = 1 (Gregorian) ISOymdA = 17760704 = July 4th, 1776 AD, for which JDA = 2369916 JDB = JDA + N = 2369916 + (10987) = 2380903 Then, given JDB = 2380903, the inverse JD function returns: ISOymdB = 18060804 (August 4th, 1806 AD) So, the Gregorian calendar date exactly +10987 days from July 4th, 1776 was August 4th, 1806. 