PHP 클래스 Prado\I18N\core\DateTimeFormatInfo

This class contains information, such as date patterns, time patterns, and AM/PM designators. To create a DateTimeFormatInfo for a specific culture, create a CultureInfo for that culture and retrieve the CultureInfo.DateTimeFormat property. For example: $culture = new CultureInfo('en_AU'); $dtfi = $culture->DateTimeFormat; To create a DateTimeFormatInfo for the invariant culture, use DateTimeFormatInfo::getInstance($culture=null); you may pass a CultureInfo parameter $culture to get the DateTimeFormatInfo for a specific culture. DateTime values are formatted using standard or custom patterns stored in the properties of a DateTimeFormatInfo. The standard patterns can be replaced with custom patterns by setting the associated properties of DateTimeFormatInfo. The following table lists the standard format characters for each standard pattern and the associated DateTimeFormatInfo property that can be set to modify the standard pattern. The format characters are case-sensitive; for example, 'g' and 'G' represent slightly different patterns. Format Character Associated Property Example Format Pattern (en-US) -------------------------------------------------------------------------- d ShortDatePattern MM/dd/yyyy D LongDatePattern dddd, dd MMMM yyyy F FullDateTimePattern dddd, dd MMMM yyyy HH:mm:ss m, M MonthDayPattern MMMM dd r, R RFC1123Pattern ddd, dd MMM yyyy HH':'mm':'ss 'GMT' s SortableDateTimePattern yyyy'-'MM'-'dd'T'HH':'mm':'ss t ShortTimePattern HH:mm T LongTimePattern HH:mm:ss Y YearMonthPattern yyyy MMMM --------------------------------------------------------------------------
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$properties array A list of properties that are accessable/writable.

공개 메소드들

메소드 설명
__construct ( $data = [] ) Initializes a new writable instance of the DateTimeFormatInfo class that is dependent on the ICU data for date time formatting information. N.B.You should not initialize this class directly unless you know what you are doing. Please use use DateTimeFormatInfo::getInstance() to create an instance.
__get ( $name ) : mixed Allow functions that begins with 'set' to be called directly as an attribute/property to retrieve the value.
__set ( $name, $value ) Allow functions that begins with 'set' to be called directly as an attribute/property to set the value.
formatDateTime ( $date, $time ) : string Formats the date and time in a culture sensitive paterrn.
getAMDesignator ( ) : string The string designator for hours that are "ante meridiem" (before noon).
getAMPMMarkers ( ) : array Get the AM and PM markers array.
getAbbreviatedDayNames ( ) : array A one-dimensional array of type String containing the culture-specific abbreviated names of the days of the week. The array for InvariantInfo contains "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", and "Sat".
getAbbreviatedMonthNames ( ) : array A one-dimensional array of type String containing the culture-specific abbreviated names of the months. The array for InvariantInfo contains "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", and "Dec".
getDateTimeOrderPattern ( ) : string Returns the date time order pattern, "{1} {0}" (default).
getDayNames ( ) : array A one-dimensional array of type String containing the culture-specific full names of the days of the week.
getEra ( $era ) : string A string containing the name of the era.
getFullDatePattern ( ) : string Returns the full date pattern "EEEE, yyyy MMMM dd" (default).
getFullTimePattern ( ) : string Returns the full time pattern "HH:mm:ss z" (default).
getInstance ( $culture = null ) : DateTimeFormatInfo Returns the DateTimeFormatInfo associated with the specified culture.
getInvariantInfo ( ) : DateTimeFormatInfo Gets the default DateTimeFormatInfo that is culture-independent (invariant).
getLongDatePattern ( ) : string Returns the long date pattern "yyyy MMMM d" (default).
getLongTimePattern ( ) : string Returns the long time pattern "HH:mm:ss z" (default).
getMediumDatePattern ( ) : string Returns the medium date pattern "yyyy MMMM d" (default).
getMediumTimePattern ( ) : string Returns the medium time pattern "HH:mm:ss" (default).
getMonthNames ( ) : array A one-dimensional array of type String containing the culture-specific full names of the months. The array for InvariantInfo contains "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", and "December"
getNarrowDayNames ( ) : array A one-dimensional array of type String containing the culture-specific narrow names of the days of the week. The array for InvariantInfo contains "S", "M", "T", "W", "T", "F", and "S".
getNarrowMonthNames ( ) : array A one-dimensional array of type String containing the culture-specific narrow names of the months. The array for InvariantInfo contains "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", and "D".
getPMDesignator ( ) : string The string designator for hours that are "post meridiem" (after noon).
getShortDatePattern ( ) : string Returns the short date pattern "yy/MM/dd" (default).
getShortTimePattern ( ) : string Returns the short time pattern "HH:mm" (default).
setAMDesignator ( $value ) Set the AM Designator. For example, 'AM'.
setAMPMMarkers ( $value ) Set the AM and PM markers array.
setAbbreviatedDayNames ( $value ) Set the abbreviated day names. The value should be an array of string starting with Sunday and ends in Saturady.
setAbbreviatedMonthNames ( $value ) Set the abbreviated month names. The value should be an array of string starting with Jan and ends in Dec.
setDayNames ( $value ) Set the day names. The value should be an array of string starting with Sunday and ends in Saturady.
setMonthNames ( $value ) Set the month names. The value should be an array of string starting with Janurary and ends in December.
setNarrowDayNames ( $value ) Set the narrow day names. The value should be an array of string starting with Sunday and ends in Saturady.
setNarrowMonthNames ( $value ) Set the narrow month names. The value should be an array of string starting with J and ends in D.
setPMDesignator ( $value ) Set the PM Designator. For example, 'PM'.

보호된 메소드들

메소드 설명
getData ( ) : array Get the internal ICU data for date time formatting.

메소드 상세

__construct() 공개 메소드

Initializes a new writable instance of the DateTimeFormatInfo class that is dependent on the ICU data for date time formatting information. N.B.You should not initialize this class directly unless you know what you are doing. Please use use DateTimeFormatInfo::getInstance() to create an instance.
또한 보기: getInstance()
public __construct ( $data = [] )

__get() 공개 메소드

Allow functions that begins with 'set' to be called directly as an attribute/property to retrieve the value.
public __get ( $name ) : mixed
리턴 mixed

__set() 공개 메소드

Allow functions that begins with 'set' to be called directly as an attribute/property to set the value.
public __set ( $name, $value )

formatDateTime() 공개 메소드

The default is "Date Time".
public formatDateTime ( $date, $time ) : string
리턴 string date and time formated

getAMDesignator() 공개 메소드

The default for InvariantInfo is "AM".
public getAMDesignator ( ) : string
리턴 string AM designator.

getAMPMMarkers() 공개 메소드

Default InvariantInfo for AM and PM is array('AM','PM');
public getAMPMMarkers ( ) : array
리턴 array AM and PM markers

getAbbreviatedDayNames() 공개 메소드

A one-dimensional array of type String containing the culture-specific abbreviated names of the days of the week. The array for InvariantInfo contains "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", and "Sat".
public getAbbreviatedDayNames ( ) : array
리턴 array abbreviated day names

getAbbreviatedMonthNames() 공개 메소드

Returns wide names if abbreviated names doesn't exist.
public getAbbreviatedMonthNames ( ) : array
리턴 array abbreviated month names.

getData() 보호된 메소드

Get the internal ICU data for date time formatting.
protected getData ( ) : array
리턴 array ICU date time formatting data.

getDateTimeOrderPattern() 공개 메소드

This is culture sensitive.
public getDateTimeOrderPattern ( ) : string
리턴 string pattern "{1} {0}".

getDayNames() 공개 메소드

The array for InvariantInfo contains "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday".
public getDayNames ( ) : array
리턴 array day names

getEra() 공개 메소드

A string containing the name of the era.
public getEra ( $era ) : string
리턴 string the era name.

getFullDatePattern() 공개 메소드

This is culture sensitive.
public getFullDatePattern ( ) : string
리턴 string pattern "EEEE, yyyy MMMM dd".

getFullTimePattern() 공개 메소드

This is culture sensitive.
public getFullTimePattern ( ) : string
리턴 string pattern "HH:mm:ss z".

getInstance() 정적인 공개 메소드

Returns the DateTimeFormatInfo associated with the specified culture.
static public getInstance ( $culture = null ) : DateTimeFormatInfo
리턴 DateTimeFormatInfo DateTimeFormatInfo for the specified culture.

getInvariantInfo() 정적인 공개 메소드

Gets the default DateTimeFormatInfo that is culture-independent (invariant).
static public getInvariantInfo ( ) : DateTimeFormatInfo
리턴 DateTimeFormatInfo default DateTimeFormatInfo.

getLongDatePattern() 공개 메소드

This is culture sensitive.
public getLongDatePattern ( ) : string
리턴 string pattern "yyyy MMMM d".

getLongTimePattern() 공개 메소드

This is culture sensitive.
public getLongTimePattern ( ) : string
리턴 string pattern "HH:mm:ss z".

getMediumDatePattern() 공개 메소드

This is culture sensitive.
public getMediumDatePattern ( ) : string
리턴 string pattern "yyyy MMM d".

getMediumTimePattern() 공개 메소드

This is culture sensitive.
public getMediumTimePattern ( ) : string
리턴 string pattern "HH:mm:ss".

getMonthNames() 공개 메소드

A one-dimensional array of type String containing the culture-specific full names of the months. The array for InvariantInfo contains "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", and "December"
public getMonthNames ( ) : array
리턴 array month names.

getNarrowDayNames() 공개 메소드

A one-dimensional array of type String containing the culture-specific narrow names of the days of the week. The array for InvariantInfo contains "S", "M", "T", "W", "T", "F", and "S".
public getNarrowDayNames ( ) : array
리턴 array narrow day names

getNarrowMonthNames() 공개 메소드

A one-dimensional array of type String containing the culture-specific narrow names of the months. The array for InvariantInfo contains "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", and "D".
public getNarrowMonthNames ( ) : array
리턴 array narrow month names.

getPMDesignator() 공개 메소드

The default for InvariantInfo is "PM".
public getPMDesignator ( ) : string
리턴 string PM designator.

getShortDatePattern() 공개 메소드

This is culture sensitive.
public getShortDatePattern ( ) : string
리턴 string pattern "yy/MM/dd".

getShortTimePattern() 공개 메소드

This is culture sensitive.
public getShortTimePattern ( ) : string
리턴 string pattern "HH:mm".

setAMDesignator() 공개 메소드

Set the AM Designator. For example, 'AM'.
public setAMDesignator ( $value )

setAMPMMarkers() 공개 메소드

For example array('AM','PM');
public setAMPMMarkers ( $value )

setAbbreviatedDayNames() 공개 메소드

For example, array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
public setAbbreviatedDayNames ( $value )

setAbbreviatedMonthNames() 공개 메소드

For example, array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep","Oct","Nov","Dec");
public setAbbreviatedMonthNames ( $value )

setDayNames() 공개 메소드

For example, array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday".);
public setDayNames ( $value )

setMonthNames() 공개 메소드

For example, array("January", "February", "March", "April", "May", "June", "July", "August", "September","October","November","December");
public setMonthNames ( $value )

setNarrowDayNames() 공개 메소드

For example, array("S", "M", "T", "W", "T", "F", "S");
public setNarrowDayNames ( $value )

setNarrowMonthNames() 공개 메소드

For example, array("J","F","M","A","M","J","J","A","S","O","N","D");
public setNarrowMonthNames ( $value )

setPMDesignator() 공개 메소드

Set the PM Designator. For example, 'PM'.
public setPMDesignator ( $value )

프로퍼티 상세

$properties 보호되어 있는 프로퍼티

A list of properties that are accessable/writable.
protected array $properties
리턴 array