- time: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$period = '1000';
$previousMonth = strtotime(date("Y-m-d", time()) . ' -' . $period . ' day');
$desde = date("Y-m-d", $previousMonth);
$hasta = date("Y-m-d", time());
echo $desde . "\n";
echo $hasta;