Definition
The mktime() function returns the Unix timestamp for a date.
Syntax
mktime(hour, minute, second, month, day, year)
Parameters
Parameter | Description |
---|---|
hour |
Optional. Specifies the hour. |
minute |
Optional. Specifies the minute. |
second |
Optional. Specifies the second. |
month |
Optional. Specifies the month. |
day |
Optional. Specifies the day. |
year |
Optional. Specifies the year. |
Example
<?php
echo "This year's christmas is on a " . date("l", mktime(0, 0, 0, 12, 25, 2021));