PHP 클래스 Prado\I18N\TDateFormat

To format date and/or time for a locale (e.g. de_DE) include a Culture attribute, for example: The date will be formatted according to this format. If no Pattern was specified then the date will be formatted with the default format (both date and time). If no value for the date is specified then the current date will be used. E.g.: will result in the current date, formatted with default localized pattern. Namespace: System.I18N Properties - Value, date,
Gets or sets the date to format. The tag content is used as Value if the Value property is not specified. - Pattern, string,
Gets or sets the formatting pattern. The predefined patterns are 'fulldate', 'longdate', 'mediumdate', 'shortdate', 'fulltime', 'longtime', 'mediumtime', and 'shorttime'. Custom patterns can specified when the Pattern property does not match the predefined patterns. - DefaultText, string,
Gets or sets the default text. If Value is not set, DefaultText will be shown instead of todays date and time.
상속: extends TI18NControl, implements Prado\IDataRenderer
파일 보기 프로젝트 열기: pradosoft/prado

보호된 프로퍼티들

프로퍼티 타입 설명
$formatter Prado\I18N\core\DateFormat Default DateFormat, set to the application culture.

공개 메소드들

메소드 설명
getData ( ) : string Get the date-time value for this control.
getDefaultText ( ) : string Get the default text value for this control.
getPattern ( ) : string Gets the date time format pattern.
getValue ( ) : string Get the date-time value for this control.
render ( $writer )
setData ( $value ) Set the date-time value for this control.
setDefaultText ( $value ) Set the default text value for this control.
setPattern ( $value ) Sets the date time formatting pattern.
setValue ( $value ) Set the date-time value for this control.

보호된 메소드들

메소드 설명
getFormattedDate ( ) Renders the localized version of the date-time value.
getPreset ( $string ) : string For a given string, try and find a preset pattern.

메소드 상세

getData() 공개 메소드

This method is required by {@link \Prado\IDataRenderer}. It is the same as {@link getValue()}.
또한 보기: getValue
부터: 3.1.2
public getData ( ) : string
리턴 string date time value.

getDefaultText() 공개 메소드

Get the default text value for this control.
public getDefaultText ( ) : string
리턴 string default text value

getFormattedDate() 보호된 메소드

If the culture is not specified, the default application culture will be used. This method overrides parent's implementation.
protected getFormattedDate ( )

getPattern() 공개 메소드

Gets the date time format pattern.
public getPattern ( ) : string
리턴 string format pattern.

getPreset() 보호된 메소드

For a given string, try and find a preset pattern.
protected getPreset ( $string ) : string
리턴 string a preset pattern if found, null otherwise.

getValue() 공개 메소드

Get the date-time value for this control.
public getValue ( ) : string
리턴 string date time value.

render() 공개 메소드

public render ( $writer )

setData() 공개 메소드

This method is required by {@link \Prado\IDataRenderer}. It is the same as {@link setValue()}.
또한 보기: setValue
부터: 3.1.2
public setData ( $value )

setDefaultText() 공개 메소드

Set the default text value for this control.
public setDefaultText ( $value )

setPattern() 공개 메소드

Sets the date time formatting pattern.
public setPattern ( $value )

setValue() 공개 메소드

Set the date-time value for this control.
public setValue ( $value )

프로퍼티 상세

$formatter 보호되어 있는 정적으로 프로퍼티

Default DateFormat, set to the application culture.
protected static DateFormat,Prado\I18N\core $formatter
리턴 Prado\I18N\core\DateFormat