# Discuss the parameter details of PHP call time format

- 2020-06-07 04:20:30
- OfStack

1. Call syntax

Use the function date() implementation to get the current time format, for example:

2. Time format parameter setting

In the above syntax, "Y-ES7en-ES8en H:i:s" appears in the format: year - month - day hour: minute: second

In this way, we just need to get the corresponding relevant time parameters can replace the time format we want!

- "am" or "pm".

A - "AM" or "PM"

Several days, two digits, if less than two digits, the front zero; For example: "01" to "31"

What day of the week, with 3 letters; Such as: "Fri"

Months, full English name; Such as: "January"

h?? 12 hour hours; For example: "01" to "12"

The hours are 24 hours. For example: "00" to "23"

If the number of hours is less than 2, it will not be filled with zero. For example: "1" to "12"

The hours of G 24 hours will not be filled by 2. Such as: "0" to "23"

Minutes earned; For example: "00" to "59"

Several days, two digits, if less than two digits, do not fill the zero; For example: "1" to "31"

What day is it? Full name. Such as: "Friday"

Months, 2 digits. If less than 2 digits, add the first zero. For example: "01" to "12"

Months, 2 digits. If less than 2 digits, zero will not be added. For example: "1" to "12"

Months, with 3 English letters; Such as: "Jan"

s � s; For example: "00" to "59"

S with prefix and suffix, 2 letters; E.g. "th", "nd"

The number of days of the specified month. For example: "28" to "31"

Total seconds

Day of the week, e.g. 0 (Sunday) to 6 (Saturday)

Year of 2016, four digits; Such as: "1999"

Year, 2 digits; Such as: "99"

The day of the first year; For example: "0" to "365"