PHP provides a variety of functions for getting time and date. apart from getting the current UNIX timestamp using the time () function and getting the current time using the date function, you can also call the getdate () function to determine the current time. This chapter introduces the "getdate ()" function. Usage of the getdate () function: the getdate () function is used to obtain information about the specified part of the date. Its syntax is as follows: getdate (timestamp); getdate () the function returns the date and time in array form... PHP provides a variety of functions for getting time and date. apart from getting the current UNIX timestamp using the time () function and getting the current time using the date function, you can also call the getdate () function to determine the current time. This chapter introduces the "getdate ()" function. Usage of the getdate () function: the getdate () function is used to obtain information about the specified part of the date. Its syntax is as follows: getdate (timestamp); getdate () the function returns the date and time information in array format. if there is no timestamp parameter, the current time prevails. The joined array elements returned by this function are as follows: getdate () the joined array elements returned by the function indicate the key names. The return value example is "seconds". the number in seconds indicates 0 to 59 "minutes". the number in minutes indicates 0 to 59 "hours". the number in hours indicates 0 to 59. the number of the day in the 23 "mday" month represents 1
1. php getdate () function get date information instance details
Summary: In PHP, there are two functions for formatting Time: date () and gmdate (). the descriptions in the official document are...
[Related Q & A recommendations ]:
Php-the use of pdo to execute SQL insert operations may be abnormal
What is the difference between the date and gmdate functions?
Javascript-js function parameters are objects
Why is the blur in javascript-componentWillUpdate not executed?
Question about the php date function?
The preceding section details the date function. For more information, see other related articles in the first PHP community!