PHP has many easy-to-use functions for displaying and processing dates.
To display date or time in a specific format, use the date() function. It takes two parameters: the format in which the date should be displayed and the timestamp representing the date you want to display. This timestamp must be the total number of seconds since 1970 as mentioned earlier (if you want to use the current time, use the time() function, which returns the "now" timestamp). date() has many formatting options, just like the strftime() function in C or the POSIX::strftime() function in Perl.
$birthday_stamp = mktime(19,45,0,3,10,1975);
$birthday_formatted = date('F d, Y - g:ia',$birthday_stamp);
echo "David was born on $birthday_formatted."
?>
will show
David was born on March 10, 1975--7:45 p.m.
Of course, if you need a known specific date, this complex format function will not Very useful. Because you already know in advance what your format will be. These functions are useful when dealing with form output that requires the user to select a date:
The above will output a radio button box with ten options-today and the next nine days. Before the program loop starts, we store the current time in the variable $d. Each
The above introduces the date and time in presentationfontcache.exe PHP, including the content of presentationfontcache.exe. I hope it will be helpful to friends who are interested in PHP tutorials.