You are here

public function CalendarEntry::formatSchedulingDateAsMySQLDateOnly in Content Planner 8

Format creation date as MySQL Date only.

Return value

string

File

modules/content_calendar/src/Component/CalendarEntry.php, line 94

Class

CalendarEntry
Class CalendarEntry.

Namespace

Drupal\content_calendar\Component

Code

public function formatSchedulingDateAsMySQLDateOnly() {
  $datetime = DateTimeHelper::convertUnixTimestampToDatetime($this->node->created);
  return $datetime
    ->format(DateTimeHelper::FORMAT_MYSQL_DATE_ONLY);
}