You are here

public function DatexObject::xtoArray in Datex 7.2

Same name and namespace in other branches
  1. 7 datex_api/datex_api_classes.inc \DatexObject::xtoArray()

Same as DatexObject toArray but in Gregorian format.

File

datex_api/datex_api.class.inc, line 485
Provides an API to work with dates.

Class

DatexObject
Base class for localized DateTime.

Code

public function xtoArray() {
  return array(
    'year' => $this
      ->xformat('Y'),
    'month' => $this
      ->xformat('n'),
    'day' => $this
      ->xformat('j'),
    'hour' => $this
      ->xformat('H'),
    'minute' => $this
      ->xformat('i'),
    'second' => $this
      ->xformat('s'),
    'timezone' => $this
      ->xformat('e'),
  );
}