Is it possible to (easily) get the first second of the current month with strtotime? (Or the start of any month, even not the current one)? Similarly, is it possible to get the end of the month, or first of next month? (I found that ‘Next month’ adds 30 days to the considered time.)
In order to get the beginning of the month, I have been doing this, which seems convoluted (especially when I have a value for time before hand, already in the format of a unix timestamp, because I have to format into a common format before returning it to a unix timestamp):
$year_month = date('Y-m', time());
$beginning_of_month = strtotime($year_month);
Any less convoluted suggestions would be appreciated.