Logo Search packages:      
Sourcecode: zendframework version File versions  Download package

static Zend_Locale_Format::getDateTime ( datetime,
array $  options = array() 
) [static]

Returns an array with 'year', 'month', 'day', 'hour', 'minute', and 'second' elements extracted from $datetime according to the order described in $format. For a format of 'd.M.y H:m:s', and an input of 10.05.1985 11:20:55, getDateTime() would return: array ('year' => 1985, 'month' => 5, 'day' => 10, 'hour' => 11, 'minute' => 20, 'second' => 55) The optional $locale parameter may be used to help extract times from strings containing both a time and a day or month name.

string$datetimeDateTime string
array$optionsOptions: format_type, fix_date, locale, date_format. See setOptions() for details.
array Possible array members: day, month, year, hour, minute, second, fixed, format

Definition at line 1224 of file Format.php.

References _checkOptions(), _parseDate(), and getDateTimeFormat().

Referenced by Zend_Date::_calculate().

        $options = self::_checkOptions($options) + self::$_options;
        if (empty($options['date_format'])) {
            $options['format_type'] = 'iso';
            $options['date_format'] = self::getDateTimeFormat($options['locale']);
        return self::_parseDate($datetime, $options);

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index