symfony API

sfDateTimeFormatInfo Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

Packages

You are currently browsing the symfony API for the 1.0 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

Defines how DateTime values are formatted and displayed, depending

Method Summary

Method Details

  • (string) formatDateTime ()

    Formats the date and time in a culture sensitive paterrn.

    The default is "Date Time".

    returns date and time formated

  • (array) 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".

    returns abbreviated day names

  • (array) getAbbreviatedMonthNames ()

    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 abbreviated month names.

  • (string) getAMDesignator ()

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

    The default for InvariantInfo is "AM".

    returns AM designator.

  • (array) getAMPMMarkers ()

    Gets the AM and PM markers array.

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

    returns AM and PM markers

  • (array) getData ()

    Gets the internal ICU data for date time formatting.

    returns ICU date time formatting data.

  • (string) getDateTimeOrderPattern ()

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

    This is culture sensitive.

    returns pattern "{1} {0}".

  • (array) getDayNames ()

    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 ()

    A string containing the name of the era.

    returns the era name.

  • (string) getFullDatePattern ()

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

    This is culture sensitive.

    returns pattern "EEEE, yyyy MMMM dd".

  • (string) getFullTimePattern ()

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

    This is culture sensitive.

    returns pattern "HH:mm:ss z".

  • (sfDateTimeFormatInfo) getInstance ()

    Returns the sfDateTimeFormatInfo associated with the specified culture.

    returns sfDateTimeFormatInfo for the specified culture.

  • (sfDateTimeFormatInfo) getInvariantInfo ()

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

    returns default sfDateTimeFormatInfo.

  • (string) getLongDatePattern ()

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

    This is culture sensitive.

    returns pattern "yyyy MMMM d".

  • (string) getLongTimePattern ()

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

    This is culture sensitive.

    returns pattern "HH:mm:ss z".

  • (string) getMediumDatePattern ()

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

    This is culture sensitive.

    returns pattern "yyyy MMM d".

  • (string) getMediumTimePattern ()

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

    This is culture sensitive.

    returns pattern "HH:mm:ss".

  • (array) 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"

    returns month names.

  • (array) 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".

    returns narrow day names

  • (array) 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".

    returns narrow month names.

  • (string) getPMDesignator ()

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

    The default for InvariantInfo is "PM".

    returns PM designator.

  • (string) getShortDatePattern ()

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

    This is culture sensitive.

    returns pattern "yy/MM/dd".

  • (string) getShortTimePattern ()

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

    This is culture sensitive.

    returns pattern "HH:mm".

  • setAbbreviatedDayNames ()

    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 ()

    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 ()

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

  • setAMPMMarkers ()

    Sets the AM and PM markers array.

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

  • setDayNames ()

    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 ()

    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 ()

    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 ()

    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 ()

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

  • __construct ()

    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 ()

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

    as an attribute/property to retrieve the value.

  • __set ()

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

    as an attribute/property to set the value.