Returns date/time information for the current local date/time:
<?phpprint_r(getdate());?>The getdate() function returns the date/time information of a timestamp or the current local date/time.
getdate( timestamp);
parameter | describe |
---|---|
timestamp | Optional. Specifies an integer Unix timestamp. Defaults to the current local time (time()). |
Return value: | Returns an associative array with information related to the timestamp: [seconds] - seconds [minutes] - minutes [hours] - hours [mday] - Day of the month [wday] - day of the week [mon] - month [year] - year [yday] - day of the year [weekday] - The name of the day of the week [month] - the name of the month [0] - Number of seconds elapsed since the Unix epoch |
---|---|
PHP version: | 4+ |