chickadee » srfi-19 » date-adjust

date-adjust DATE AMOUNT KEY #!optional CLOCK-TYPEprocedure

Returns a new date, the DATE adjusted by the AMOUNT of KEY.

integer ;
symbol ; '(years quarters months weeks days hours minutes seconds milliseconds microseconds nanoseconds).

If the day of the month of DATE is greater than the number of days in the final month, the day of the month will change to the last day in the final month.

Adjusting a time KEY (ex: 'hours) follows the semantics of date-add-duration.