Concept | advanced
Java Advanced Date Concepts
If your Java program displays time and date to users in different time zones or different countries, you need to understand some of the more advanced aspects of the Java date
Date () is a commonly used date-time function, let me summarize the date () function of the various forms of usage, there is a need to learn the friend can refer to.
Formatted dateThe first parameter of the date () function specifies how the date/
Date () is a commonly used date-time function, let me summarize the date () function of the various forms of usage, there is a need to learn the friend can refer to.Formatted dateThe first parameter of the date () function specifies how the
Formatted dateThe first parameter of the date () function specifies how the date/time is formatted. It uses letters to represent the format of dates and times. Here is a list of some availableThe letters:D-Day of the month (01-31)• M-Current month,
PHP Date-time function date ()1, year-month-day
Copy Code code as follows:
echo Date (' y-m-j ');
2007-02-6
echo Date (' y-n-j ');
07-2-6
Capital Y represents a four-digit year, while lowercase y represents a
php datetime function date ()
1, year-month-day
echo Date (' y-m-j ');
2007-02-6
echo Date (' y-n-j ');
07-2-6
Uppercase Y represents the year four digits, while lowercase y represents the two digits of the year;
Lowercase m represents the number
PHP Date-time function date ()
1, year-month-day
echo Date (' y-m-j ');
2007-02-6
echo Date (' y-n-j ');
07-2-6
Capital Y represents a four-digit year, while lowercase y represents a two-digit number for the year;
Lowercase m represents the number
Format dateThe first parameter of the date () function specifies how to format the date/time. It uses letters to indicate the date and time formats. Some availableLetter:• Day in d-month (01-31)• M-current month, in numbers (01-12)• Y-current year
checkdate ($month, $date, $year)
If the applied value constitutes a valid date, the function returns to true. For example, for the error date February 31, 2005, this function returns FALSE.
Use this function to check the date and make the date
checkdate ($month, $date, $year)If the value that is applied constitutes a valid date, the function returns True. For example, for an error date of February 31, 2005, this function returns to False.You can use this function to check the date and
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.