$timestamp = strtotime( '2018-2' );$start_time = date( 'Y-m-1 00:00:00', $timestamp );$mdays = date( 't', $timestamp );$end_time = date( 'Y-m-' . $mdays . ' 23:59:59', $timestamp );echo $start_time;echo $end_time;