Swat/SwatDate.php
public static function getFormatById($id)
    {
        // Note: The format() method does not localize results, so these
        // format codes are _not_ wrapped in gettext calls.

        switch ($id) {
            case self::DF_MDY:
                return 'm/d/y';
            case self::DF_MDY_SHORT:
                return 'mdy';
            case self::DF_DATE:
                return 'F j, Y';
            case self::DF_DATE_LONG:
                return 'l, F j, Y';
            case self::DF_DATE_TIME:
                return 'F j, Y g:i a';
            case self::DF_DATE_TIME_LONG:
                return 'l, F j, Y g:i a';
            case self::DF_TIME:
                return 'g:i a';
            case self::DF_DATE_SHORT:
                return 'M j, Y';
            case self::DF_DATE_SHORT_NOYEAR:
                return 'M j';
            case self::DF_DATE_TIME_SHORT:
                return 'M j, Y g:i a';
            case self::DF_DATE_TIME_SHORT_NOYEAR:
                return 'M j, g:i a';
            case self::DF_MY:
                return 'F Y';
            case self::DF_CC_MY:
                return 'm / Y';
            case self::DF_Y:
                return 'Y';
            case self::DF_ISO_8601_BASIC:
                return 'Ymd\THis';
            case self::DF_ISO_8601_EXTENDED:
                return 'Y-m-d\TH:i:s';
            case self::DF_RFC_2822:
                return 'r';
            default:
                throw new Exception("Unknown date format id '$id'.");
        }
    }
public static function getFormatById($id)
    {
        // Note: The format() method does not localize results, so these
        // format codes are _not_ wrapped in gettext calls.

        switch ($id) {
            case self::DF_MDY:
                return 'm/d/y';
            case self::DF_MDY_SHORT:
                return 'mdy';
            case self::DF_DATE:
                return 'F j, Y';
            case self::DF_DATE_LONG:
                return 'l, F j, Y';
            case self::DF_DATE_TIME:
                return 'F j, Y g:i a';
            case self::DF_DATE_TIME_LONG:
                return 'l, F j, Y g:i a';
            case self::DF_TIME:
                return 'g:i a';
            case self::DF_DATE_SHORT:
                return 'M j, Y';
            case self::DF_DATE_SHORT_NOYEAR:
                return 'M j';
            case self::DF_DATE_TIME_SHORT:
                return 'M j, Y g:i a';
            case self::DF_DATE_TIME_SHORT_NOYEAR:
                return 'M j, g:i a';
            case self::DF_MY:
                return 'F Y';
            case self::DF_CC_MY:
                return 'm / Y';
            case self::DF_Y:
                return 'Y';
            case self::DF_ISO_8601_BASIC:
                return 'Ymd\THis';
            case self::DF_ISO_8601_EXTENDED:
                return 'Y-m-d\TH:i:s';
            case self::DF_RFC_2822:
                return 'r';
            default:
                throw new Exception("Unknown date format id '$id'.");
        }
    }
public static function getFormatById ( $ id ) { // Note: The format() method does not localize results, so these // format codes are _not_ wrapped in gettext calls. switch ( $ id ) { case self :: DF_MDY : return 'm/d/y' ; case self :: DF_MDY_SHORT : return 'mdy' ; case self :: DF_DATE : return 'F j, Y' ; case self :: DF_DATE_LONG : return 'l, F j, Y' ; case self :: DF_DATE_TIME : return 'F j, Y g:i a' ; case self :: DF_DATE_TIME_LONG : return 'l, F j, Y g:i a' ; case self :: DF_TIME : return 'g:i a' ; case self :: DF_DATE_SHORT : return 'M j, Y' ; case self :: DF_DATE_SHORT_NOYEAR : return 'M j' ; case self :: DF_DATE_TIME_SHORT : return 'M j, Y g:i a' ; case self :: DF_DATE_TIME_SHORT_NOYEAR : return 'M j, g:i a' ; case self :: DF_MY : return 'F Y' ; case self :: DF_CC_MY : return 'm / Y' ; case self :: DF_Y : return 'Y' ; case self :: DF_ISO_8601_BASIC : return 'Ymd\THis' ; case self :: DF_ISO_8601_EXTENDED : return 'Y-m-d\TH:i:s' ; case self :: DF_RFC_2822 : return 'r' ; default : throw new Exception ( "Unknown date format id '$id'." ) ; } }
Gets a date format string by id

@param integer $id the id of the format string to retrieve.

@return string the formatting string that was requested.

@throws SwatException
Gets a date format string by id