Joomla CMS
2.5.24 (avec JPlatform 11.4 inclus)
Documentation des API du CMS Joomla en version 2.5 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
__construct ($date= 'now', $tz=null) | |
__get ($name) | |
__toString () | |
dayToString ($day, $abbr=false) | |
calendar ($format, $local=false, $translate=true) | |
format ($format, $local=false, $translate=true) | |
getOffsetFromGMT ($hours=false) | |
monthToString ($month, $abbr=false) | |
setOffset ($offset) | |
setTimezone ($tz) | |
toFormat ($format= '%Y-%m-%d%H:%M:%S', $local=false) | |
toISO8601 ($local=false) | |
toMySQL ($local=false) | |
toSql ($local=false, JDatabase $dbo=null) | |
toRFC822 ($local=false) | |
toUnix () |
Fonctions membres publiques statiques | |
static | getInstance ($date= 'now', $tz=null) |
Attributs publics | |
const | DAY_ABBR = "\x021\x03" |
const | DAY_NAME = "\x022\x03" |
const | MONTH_ABBR = "\x023\x03" |
const | MONTH_NAME = "\x024\x03" |
Attributs publics statiques | |
static | $format = 'Y-m-d H:i:s' |
Attributs protégés | |
$_tz |
Attributs protégés statiques | |
static | $gmt |
static | $stz |
static | $offsets |
JDate::__construct | ( | $date = 'now' , |
|
$tz = null |
|||
) |
Constructor.
string | $date | String in a format accepted by strtotime(), defaults to "now". |
mixed | $tz | Time zone to be used for the date. |
JException |
JDate::__get | ( | $name | ) |
JDate::__toString | ( | ) |
Magic method to render the date object in the format specified in the public static member JDate::$format.
Gets the date as a formatted string in a local calendar.
string | $format | The date format specification string (see PHP_MANUAL#date) |
boolean | $local | True to return the date string in the local time zone, false to return it in GMT. |
boolean | $translate | True to translate localised strings |
JDate::dayToString | ( | $day, | |
$abbr = false |
|||
) |
Translates day of week number to a string.
integer | $day | The numeric day of the week. |
boolean | $abbr | Return the abbreviated day string? |
Références JText\_().
Gets the date as a formatted string.
string | $format | The date format specification string (see PHP_MANUAL#date) |
boolean | $local | True to return the date string in the local time zone, false to return it in GMT. |
boolean | $translate | True to translate localised strings |
Références $return.
|
static |
Proxy for new JDate().
string | $date | String in a format accepted by strtotime(), defaults to "now". |
mixed | $tz | Time zone to be used for the date. |
JException |
Références $date.
JDate::getOffsetFromGMT | ( | $hours = false | ) |
Get the time offset from GMT in hours or seconds.
boolean | $hours | True to return the value in hours. |
JDate::monthToString | ( | $month, | |
$abbr = false |
|||
) |
Translates month number to a string.
integer | $month | The numeric month of the year. |
boolean | $abbr | If true, return the abbreviated month string |
Références JText\_().
JDate::setOffset | ( | $offset | ) |
Set the date offset (in hours).
float | $offset | The offset in hours. |
Références JLog\add(), et JLog\WARNING.
JDate::setTimezone | ( | $tz | ) |
Method to wrap the setTimezone() function and set the internal time zone object.
object | $tz | The new DateTimeZone object. |
JDate::toFormat | ( | $format = '%Y-%m-%d %H:%M:%S' , |
|
$local = false |
|||
) |
Gets the date in a specific format
Returns a string formatted according to the given format. Month and weekday names and other language dependent strings respect the current locale
string | $format | The date format specification string (see PHP_MANUAL#strftime) |
boolean | $local | True to return the date string in the local time zone, false to return it in GMT. |
Références $date, JLog\add(), et JLog\WARNING.
JDate::toISO8601 | ( | $local = false | ) |
Gets the date as an ISO 8601 string. IETF RFC 3339 defines the ISO 8601 format and it can be found at the IETF Web site.
boolean | $local | True to return the date string in the local time zone, false to return it in GMT. |
JDate::toMySQL | ( | $local = false | ) |
Gets the date as an MySQL datetime string.
boolean | $local | True to return the date string in the local time zone, false to return it in GMT. |
Références JLog\add(), et JLog\WARNING.
JDate::toRFC822 | ( | $local = false | ) |
Gets the date as an RFC 822 string. IETF RFC 2822 supercedes RFC 822 and its definition can be found at the IETF Web site.
boolean | $local | True to return the date string in the local time zone, false to return it in GMT. |
Gets the date as an SQL datetime string.
boolean | $local | True to return the date string in the local time zone, false to return it in GMT. |
JDatabase | $dbo | The database driver or null to use JFactory::getDbo() |
Références JFactory\getDbo(), et null.
JDate::toUnix | ( | ) |
Gets the date as UNIX time stamp.
|
protected |
|
static |
|
staticprotected |
|
staticprotected |
|
staticprotected |
const JDate::DAY_ABBR = "\x021\x03" |
const JDate::DAY_NAME = "\x022\x03" |
const JDate::MONTH_ABBR = "\x023\x03" |
const JDate::MONTH_NAME = "\x024\x03" |