O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

getdate

Synopsis

array getdate([int timestamp])

Returns an associative array containing values for various components for the given timestamp time and date. If no timestamp is given, the current date and time is used. This can be a variation on the use of the date() function. The array contains the following keys and values:

seconds

Seconds

minutes

Minutes

hours

Hours

mday

Day of the month

wday

Numeric day of the week (Sunday is 0)

mon

Month

year

Year

yday

Day of the year

weekday

Name of the day of the week (Sunday through Saturday)

month

Name of the month (January through December)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required