[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/joomla/utilities/ -> date.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
License: GNU/GPL, see LICENSE.php
Version: $Id: date.php 14401 2010-01-26 14:10:00Z louis $
File Size: 303 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

JDate:: (11 methods):
  __construct()
  setOffset()
  getOffset()
  toRFC822()
  toISO8601()
  toMySQL()
  toUnix()
  toFormat()
  _strftime()
  _monthToString()
  _dayToString()


Class: JDate  - X-Ref

JDate is a class that stores a date

__construct($date = 'now', $tzOffset = 0)   X-Ref
Creates a new instance of JDate representing a given date.

Accepts RFC 822, ISO 8601 date formats as well as unix time stamps.
If not specified, the current date and time is used.

param: mixed $date optional the date this JDate will represent.
param: int $tzOffset optional the timezone $date is from

setOffset($offset)   X-Ref
Set the date offset (in hours)

param: float The offset in hours

getOffset()   X-Ref
Get the date offset (in hours)

return: integer

toRFC822($local = false)   X-Ref
Gets the date as an RFC 822 date.

return: a date in RFC 822 format

toISO8601($local = false)   X-Ref
Gets the date as an ISO 8601 date.

return: a date in ISO 8601 (RFC 3339) format

toMySQL($local = false)   X-Ref
Gets the date as in MySQL datetime format

return: a date in MySQL datetime format

toUnix($local = false)   X-Ref
Gets the date as UNIX time stamp.

return: a date as a unix time stamp

toFormat($format = '%Y-%m-%d %H:%M:%S')   X-Ref
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

param: string $format  The date format specification string (see {@link PHP_MANUAL#strftime})
return: a date in a specific format

_strftime($format, $time)   X-Ref
Translates needed strings in for JDate::toFormat (see {@link PHP_MANUAL#strftime})

param: string $format The date format specification string (see {@link PHP_MANUAL#strftime})
param: int $time Unix timestamp
return: string a date in the specified format

_monthToString($month, $abbr = false)   X-Ref
Translates month number to string

param: int $month The numeric month of the year
param: bool $abbr Return the abreviated month string?
return: string month string

_dayToString($day, $abbr = false)   X-Ref
Translates day of week number to string

param: int $day The numeric day of the week
param: bool $abbr Return the abreviated day string?
return: string day string



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1