symfony API

sfDateTimeFormatInfo Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.4 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:

Defines how DateTime values are formatted and displayed, depending

Method Summary

  • string formatDateTime()
    Formats the date and time in a culture sensitive paterrn.
  • array getAbbreviatedDayNames()
    A one-dimensional array of type String containing
  • array getAbbreviatedMonthNames()
    A one-dimensional array of type String containing the
  • string getAMDesignator()
    The string designator for hours that are "ante meridiem" (before noon).
  • array getAMPMMarkers()
    Gets the AM and PM markers array.
  • array getData()
    Gets the internal ICU data for date time formatting.
  • string getDateTimeOrderPattern()
    Returns the date time order pattern, "{1} {0}" (default).
  • array getDayNames()
    A one-dimensional array of type String containing the
  • string getEra($era)
    A string containing the name of the era.
  • string getFullDatePattern()
    Returns the full date pattern "EEEE, yyyy MMMM dd" (default).
  • string getFullTimePattern()
    Returns the full time pattern "HH:mm:ss z" (default).
  • sfDateTimeFormatInfo getInstance($culture)
    Returns the sfDateTimeFormatInfo associated with the specified culture.
  • sfDateTimeFormatInfo getInvariantInfo()
    Gets the default sfDateTimeFormatInfo that is culture-independent (invariant).
  • string getLongDatePattern()
    Returns the long date pattern "yyyy MMMM d" (default).
  • string getLongTimePattern()
    Returns the long time pattern "HH:mm:ss z" (default).
  • string getMediumDatePattern()
    Returns the medium date pattern "yyyy MMMM d" (default).
  • string getMediumTimePattern()
    Returns the medium time pattern "HH:mm:ss" (default).
  • array getMonthNames()
    A one-dimensional array of type String containing the
  • array getNarrowDayNames()
    A one-dimensional array of type String containing
  • array getNarrowMonthNames()
    A one-dimensional array of type String containing the
  • string getPMDesignator()
    The string designator for hours that are "post meridiem" (after noon).
  • string getShortDatePattern()
    Returns the short date pattern "yy/MM/dd" (default).
  • string getShortTimePattern()
    Returns the short time pattern "HH:mm" (default).
  • setAbbreviatedDayNames($value)
    Sets the abbreviated day names. The value should be
  • setAbbreviatedMonthNames($value)
    Sets the abbreviated month names. The value should be
  • setAMDesignator($value)
    Sets the AM Designator. For example, 'AM'.
  • setAMPMMarkers($value)
    Sets the AM and PM markers array.
  • setDayNames($value)
    Sets the day names. The value should be
  • setMonthNames($value)
    Sets the month names. The value should be
  • setNarrowDayNames($value)
    Sets the narrow day names. The value should be
  • setNarrowMonthNames($value)
    Sets the narrow month names. The value should be
  • setPMDesignator($value)
    Sets the PM Designator. For example, 'PM'.
  • __construct($data)
    Initializes a new writable instance of the sfDateTimeFormatInfo class
  • mixed __get()
    Allows functions that begins with 'set' to be called directly
  • __set()
    Allows functions that begins with 'set' to be called directly

Method Details

  • (string) formatDateTime () Browse code

    Formats the date and time in a culture sensitive paterrn.

    The default is "Date Time".

    returns date and time formated

  • (array) getAbbreviatedDayNames () Browse code

    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".

    returns abbreviated day names

  • (array) getAbbreviatedMonthNames () Browse code

    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".

    Returns wide names if abbreviated names doesn't exist.

    returns abbreviated month names.

  • (string) getAMDesignator () Browse code

    The string designator for hours that are "ante meridiem" (before noon).

    The default for InvariantInfo is "AM".

    returns AM designator.

  • (array) getAMPMMarkers () Browse code

    Gets the AM and PM markers array.

    Default InvariantInfo for AM and PM is array('AM','PM');

    returns AM and PM markers

  • (array) getData () Browse code

    Gets the internal ICU data for date time formatting.

    returns ICU date time formatting data.

  • (string) getDateTimeOrderPattern () Browse code

    Returns the date time order pattern, "{1} {0}" (default).

    This is culture sensitive.

    returns pattern "{1} {0}".

  • (array) getDayNames () Browse code

    A one-dimensional array of type String containing the

    culture-specific full names of the days of the week.
    The array for InvariantInfo contains "Sunday", "Monday",
    "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday".

    returns day names

  • (string) getEra ($era) Browse code

    $era era The integer representing the era.

    A string containing the name of the era.

    returns the era name.

  • (string) getFullDatePattern () Browse code

    Returns the full date pattern "EEEE, yyyy MMMM dd" (default).

    This is culture sensitive.

    returns pattern "EEEE, yyyy MMMM dd".

  • (string) getFullTimePattern () Browse code

    Returns the full time pattern "HH:mm:ss z" (default).

    This is culture sensitive.

    returns pattern "HH:mm:ss z".

  • (sfDateTimeFormatInfo) getInstance ($culture) Browse code

    $culture the culture that gets the sfDateTimeFormat property.

    Returns the sfDateTimeFormatInfo associated with the specified culture.

    returns sfDateTimeFormatInfo for the specified culture.

  • (sfDateTimeFormatInfo) getInvariantInfo () Browse code

    Gets the default sfDateTimeFormatInfo that is culture-independent (invariant).

    returns default sfDateTimeFormatInfo.

  • (string) getLongDatePattern () Browse code

    Returns the long date pattern "yyyy MMMM d" (default).

    This is culture sensitive.

    returns pattern "yyyy MMMM d".

  • (string) getLongTimePattern () Browse code

    Returns the long time pattern "HH:mm:ss z" (default).

    This is culture sensitive.

    returns pattern "HH:mm:ss z".

  • (string) getMediumDatePattern () Browse code

    Returns the medium date pattern "yyyy MMMM d" (default).

    This is culture sensitive.

    returns pattern "yyyy MMM d".

  • (string) getMediumTimePattern () Browse code

    Returns the medium time pattern "HH:mm:ss" (default).

    This is culture sensitive.

    returns pattern "HH:mm:ss".

  • (array) getMonthNames () Browse code

    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"

    returns month names.

  • (array) getNarrowDayNames () Browse code

    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".

    returns narrow day names

  • (array) getNarrowMonthNames () Browse code

    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".

    returns narrow month names.

  • (string) getPMDesignator () Browse code

    The string designator for hours that are "post meridiem" (after noon).

    The default for InvariantInfo is "PM".

    returns PM designator.

  • (string) getShortDatePattern () Browse code

    Returns the short date pattern "yy/MM/dd" (default).

    This is culture sensitive.

    returns pattern "yy/MM/dd".

  • (string) getShortTimePattern () Browse code

    Returns the short time pattern "HH:mm" (default).

    This is culture sensitive.

    returns pattern "HH:mm".

  • setAbbreviatedDayNames ($value) Browse code

    $value abbreviated day names.

    Sets the abbreviated day names. The value should be

    an array of string starting with Sunday and ends in Saturady.
    For example,
    array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");

  • setAbbreviatedMonthNames ($value) Browse code

    $value month names.

    Sets the abbreviated month names. The value should be

    an array of string starting with Jan and ends in Dec.
    For example,
    array("Jan", "Feb", "Mar", "Apr", "May", "Jun",
    "Jul", "Aug", "Sep","Oct","Nov","Dec");

  • setAMDesignator ($value) Browse code

    $value AM designator.

    Sets the AM Designator. For example, 'AM'.

  • setAMPMMarkers ($value) Browse code

    $value AM and PM markers

    Sets the AM and PM markers array.

    For example array('AM','PM');

  • setDayNames ($value) Browse code

    $value day names.

    Sets the day names. The value should be

    an array of string starting with Sunday and ends in Saturady.
    For example,
    array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
    "Friday", "Saturday".);

  • setMonthNames ($value) Browse code

    $value month names.

    Sets the month names. The value should be

    an array of string starting with Janurary and ends in December.
    For example,
    array("January", "February", "March", "April", "May", "June",
    "July", "August", "September","October","November","December");

  • setNarrowDayNames ($value) Browse code

    $value narrow day names.

    Sets the narrow day names. The value should be

    an array of string starting with Sunday and ends in Saturady.
    For example,
    array("S", "M", "T", "W", "T", "F", "S");

  • setNarrowMonthNames ($value) Browse code

    $value month names.

    Sets the narrow month names. The value should be

    an array of string starting with J and ends in D.
    For example,
    array("J","F","M","A","M","J","J","A","S","O","N","D");

  • setPMDesignator ($value) Browse code

    $value PM designator.

    Sets the PM Designator. For example, 'PM'.

  • __construct ($data) Browse code

    $data ICU data for date time formatting.

    Initializes a new writable instance of the sfDateTimeFormatInfo 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
    sfDateTimeFormatInfo::getInstance() to create an instance.

  • (mixed) __get () Browse code

    Allows functions that begins with 'set' to be called directly

    as an attribute/property to retrieve the value.

  • __set () Browse code

    Allows functions that begins with 'set' to be called directly

    as an attribute/property to set the value.