function _ad_report_last_day_of_month in Advertisement 5.2
Same name and namespace in other branches
- 6.3 report/ad_report.module \_ad_report_last_day_of_month()
- 6.2 report/ad_report.module \_ad_report_last_day_of_month()
- 7 report/ad_report.module \_ad_report_last_day_of_month()
Returns a timestamp for the last hour of the last day of the month.
2 calls to _ad_report_last_day_of_month()
- ad_report_admin in report/
ad_report.module - ad_report_range_form in report/
ad_report.module - Return a form for selecting a date range for generating a report.
File
- report/
ad_report.module, line 364 - Provides comprehensive charts and reports about advertising statistics.
Code
function _ad_report_last_day_of_month($time = NULL) {
if ($time === NULL) {
$time = time();
}
$month = date('m', $time);
$year = date('Y', $time);
$day = date('d', mktime(0, 0, 0, $month + 1, 0, $year));
return strtotime("{$year}{$month}{$day}2359");
}