So I am working on this system that is sorting dates by decades. I am using make times and I have everything working fine until it hits the year 1900 or below. Afer that everything returns a Dec 24,1964 type date. Can anyone else me why this is happening and a possbile soltuion?
And the code for this:
//$decades is a string ex: '1950-1960'
$decade_array=explode('-',$decades);
$date_active=date("M-d-Y", mktime(0, 0, 0, 1,1 , trim($decade_array[0]) ));
$date_inactive=date("M-d-Y", mktime(0, 0, 0, 1, 1, trim($decade_array[1]) ));
echo $date_active.' '.$date_inactive;