CI_Calendar::adjust_date()

adjust_date($month, $year)

Parameters:
  • $month (int) – Month
  • $year (int) – Year
Returns:

An associative array containing month and year

Return type:

array

This method makes sure that you have a valid month/year. For example, if you submit 13 as the month, the year will increment and the month will become January:

print_r($this->calendar->adjust_date(13, 2014));

outputs:

Array
(
        [month] => '01'
        [year] => '2015'
)
doc_CodeIgniter
2016-10-15 16:30:57
Comments
Leave a Comment

Please login to continue.