public static function DateTimeHelper::getLastDayOfMonth in Content Planner 8
Parameters
int $month:
int $year:
Return value
\DateTime
1 call to DateTimeHelper::getLastDayOfMonth()
- ContentCalendarService::getNodesByType in modules/
content_calendar/ src/ ContentCalendarService.php - Get Nodes by Type.
File
- modules/
content_calendar/ src/ DateTimeHelper.php, line 86
Class
Namespace
Drupal\content_calendarCode
public static function getLastDayOfMonth($month, $year) {
$datetime = new \DateTime();
$datetime
->setDate($year, $month, 1);
$datetime
->setTime(23, 59, 59);
$datetime
->modify('last day of this month');
return $datetime;
}