- date: documentation ( source)
- strtotime: documentation ( source)
- printf: documentation ( source)
<?php
printf("2013-10-31, -1 month: %s\n2013-10-31, first day of 1 month ago: %s",
date('m', strtotime('2013-10-31 -1 month')),
date('m', strtotime('2013-10-31 first day 1 month ago')));