Return the Unix timestamp for a GMT date, and then use it to determine the day of that date.
<?php // Prints: October 3, 1975 was on a Friday echo “Oct 3, 1975 was on a “.date(“l”, gmmktime(0,0,0,10,3,1975)); ?> |
The gmmktime() function returns the Unix timestamp for a GMT date.
Tip: This function operates the same as mktime(), but the parameters represent a GMT date.
gmmktime(hour, minute, second, month, day, year, is_dst) |
Parameter |
Description |
hour |
Optional. Indicates the hour. |
minute |
Optional. Indicates the minute. |
second |
Optional. Indicates the second. |
month |
Optional. Indicates the month. |
day |
Optional. Indicates the day. |
year |
Optional. Indicates the year. |
is_dst |
Optional. Parameters always represent a GMT date, so |
Return Value: |
Returns an integer Unix timestamp. |
PHP Version: |
4+ |
PHP Changelog: |
PHP 5.1: The |