 <p>You can do something like as</p> <pre><code>$get = "19 March"; $given_date = "01 January 2010"; $date_month = date('d F',strtotime($given_date)); $year = date('Y',strtotime($given_date)); if(strtotime($given_date) - strtotime($date_month) &lt; 0){ echo date('l,d F Y',strtotime("$get $year")); }else{ echo date('l,d F Y',strtotime("$get ".($year+1))); } </code></pre>