Swat/SwatDateEntry.php
private function getFormattedDate(SwatDate $date)
    {
        // note: the display of the date is not locale specific as this
        // is quite difficult without a good i18n/l10n library

        $format = '';

        if ($this->display_parts & self::MONTH) {
            $format .= ' MMMM';
        }

        if ($this->display_parts & self::DAY) {
            $format .= ' d,';
        }

        if ($this->display_parts & self::YEAR) {
            $format .= ' yyyy';
        }

        if ($this->display_parts & self::TIME) {
            $format .= ' h:mm a';
        }

        $format = trim($format, ', ');

        return $date->formatLikeIntl($format);
    }
private function getFormattedDate(SwatDate $date)
    {
        // note: the display of the date is not locale specific as this
        // is quite difficult without a good i18n/l10n library

        $format = '';

        if ($this->display_parts & self::MONTH) {
            $format .= ' MMMM';
        }

        if ($this->display_parts & self::DAY) {
            $format .= ' d,';
        }

        if ($this->display_parts & self::YEAR) {
            $format .= ' yyyy';
        }

        if ($this->display_parts & self::TIME) {
            $format .= ' h:mm a';
        }

        $format = trim($format, ', ');

        return $date->formatLikeIntl($format);
    }
private function getFormattedDate ( SwatDate $ date ) { // note: the display of the date is not locale specific as this // is quite difficult without a good i18n/l10n library $ format = '' ; if ( $ this -> display_parts & self :: MONTH ) { $ format .= ' MMMM' ; } if ( $ this -> display_parts & self :: DAY ) { $ format .= ' d,' ; } if ( $ this -> display_parts & self :: YEAR ) { $ format .= ' yyyy' ; } if ( $ this -> display_parts & self :: TIME ) { $ format .= ' h:mm a' ; } $ format = trim ( $ format , ', ' ) ; return $ date -> formatLikeIntl ( $ format ) ; }
Formats a date for this date entry

Returns a date string formatted according to the properties of this
date entry widget. This is used primarily for returning formatted
valid start and valid end dates for user error messages.

@param SwatDate $date the date object to format.

@return string a date formatted according to the properties of this date
entry.
Formats a date for this date entry