You are here

final function CalendarSystemsPartialImplementation::xFormatArray in Calendar Systems 8.3

Put all day and time parts in an array, in gregorian.

Return value

array

Overrides CalendarSystemsInterface::xFormatArray

File

src/CalendarSystems/CalendarSystemsPartialImplementation.php, line 73

Class

CalendarSystemsPartialImplementation

Namespace

Drupal\calendar_systems\CalendarSystems

Code

final function xFormatArray() {
  return [
    'year' => intval($this->origin
      ->format('Y')),
    'month' => intval($this->origin
      ->format('n')),
    'day' => intval($this->origin
      ->format('j')),
    'hour' => intval($this->origin
      ->format('G')),
    'minute' => intval($this->origin
      ->format('i')),
    'second' => intval($this->origin
      ->format('s')),
  ];
}