- getdate: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
//$writer = new XMLWriter();
//echo var_dump(getdate(strtotime("2013-2")));
date("Y-m-t", getdate(strtotime("2013-2")));
//echo date("Y-m-t", strtotime("first day of previous month") ) ;