Detailed introduction to date functions

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.