Next: aggregate_positions, Previous: adapt_matlab, Up: Octave Functions and Scripts [Contents][Index]
Add or subtract given years, months or days to a given input date. End of month of input date will be preserved if no days are added. Both datenum and datevec format are returned. Explicit specification of years, months, days:
Implicit specification of value and unit:
Single date input possible only. Example call:
[newdatenum newdatevec] = addtodatefinancial('31-Mar-2016', 1, 'years') newdatenum = 736785 newdatevec = [2017 3 31] [newdatenum newdatevec] = addtodatefinancial('31-Mar-2016', -1, -6, -4) newdatenum = 735869 newdatevec = [2014 9 27]
See also: addtodate.