The date class
in Java.util
www.linuxaid.com.cn 01-09-20 23:03 496p everywhere
--------------------------------------------------------------------------------
in JSP, we often have to deal with the date and time information, when you can
PHP provides a large number of built-in functions that enable developers to work on time, greatly improving productivity.Describes some common PHP date and time functions and the processing of dates and times.Frequently used date and time processing
PHP Time and date
PHP provides a large number of built-in functions that enable developers to work on time, greatly improving productivity. Describes some common PHP date and time functions and the processing of dates and times.
Common date and
Date(PHP 4, PHP 5, PHP 7)date- Formatting a local time/dateDescription ¶string Date ( string $format [, int $timestamp ]) Returns a string that is the result of an integer in a timestamp given format string. If no timestamp is given, the local
Today's time to meet the date ("Y-m-d h:i:s") is always the same as the actual time. So query the relevant information to know the reason, collation as follows. The cause of this phenomenon: starting from php5.1.0, PHP.ini added the Date.timezone
A, date () function
string Date (string $format [, int $timestamp])Function: Formats the timestamp as an easy-to-read time and date.
Parameters
Description
Format
Necessary. Specifies
PHP two commonly used date related functions date and strtotime, I believe we must not be unfamiliar. But we usually use all just basic function, what time stamp change date format, date format change timestamp.In fact, these two functions have a
Date
(PHP 4, PHP 5)
date-formatting a local time/date
DescriptionString Date (string $format [, int $timestamp])
Returns a string that is the result of the timestamp of an integer in a given format string. If no timestamp is given, the local current
PHP date format a local time date(PHP 4, PHP 5)date- Formatting a local time/dateDescriptionstring date ( string $format [, int $timestamp ]) Returns a string that is the result of the timestamp of an integer in a given format string. If no
format character
Description
example of return value
Day
---
---
D
The day ordinal of a month with a leading zero 2-digit number
01 to 31
J
The day ordinal of the month without
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.