- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$a_date = "2009-11-23";
echo date("Y-m-t", strtotime($a_date));
echo "<br/>";
echo (new DateTime('2010-01-19'))
->modify('first day of this month')
->format('jS, F Y');