Index

(misc)

o2_mkdate

string o2_mkdate(string $date, integer $years, integer $months, integer $days)

Takes a Janox date as first parameter, adds to it the passed numbers of $years, $months and $days and returns the result as a Janox date.
Janox date format = 'YYYYMMDD'.

If start date is an end-of-month and passed $days is 0, then end-of-month is preserved.
End-of-month samples:
o2_mkdate('20160229', 0, 1, 0) = '20160331'
o2_mkdate('20160229', 1, 0, 0) = '20170228'


Parameters:
  1. $date
  2. Start date in Janox format 'YYYYMMDD'
  3. $years
  4. Years to add
  5. $months
  6. Months to add
  7. $days
  8. Days to add
Related functions:

o2_mktime