This function returns an array that contains date and time information for a Unix timestamp.

The returning array contains ten elements with relevant information needed when formatting a date string:

* [seconds] – seconds
* [minutes] – minutes
* [hours] – hours
* [mday] – day of the month
* [wday] – day of the week
* [year] – year
* [yday] – day of the year
* [weekday] – name of the weekday
* [month] – name of the month

Syntax: getdate(timestamp)

Description:

The argument “timestamp” is Optional. It specifies the time in Unix time format.

Example:
Code:

$today = getdate();
print_r($today);

Output:

Array (
[seconds] => 49
[minutes] => 57
[hours] => 10
[mday] => 10
[wday] => 0
[mon] => 4
[year] => 2011
[yday] => 99
[weekday] => Sunday
[month] => April
[0] => 1302433069
)

eXTReMe Tracker