![]() y - Represent year in two digits (08 or 14).M - Represent month in text, abbreviated (Jan to Dec).m - Represent month in numbers with leading zeros (01 or 12).D - Represent day of the week in text as an abbreviation (Mon to Sun).d - Represent day of the month two digits with leading zeros (01 or 31).Here are some the date-related formatting characters that are commonly used in format string: The format parameter of the date() function is in fact a string that can contain multiple characters allowing you to generate a date string containing various components of the date and time, like day of the week, AM or PM, etc. Specifies an integer Unix timestamp.Note: The PHP date() function return the current date and time according to the built-in clock of the web server on which the script has been executed. DATE_RFC3339 - Same as DATE_ATOM (since PHP 5.1.3).DATE_COOKIE - HTTP Cookies (example: Friday, 12-Apr-13 15:52:01 UTC).U - The seconds since the Unix Epoch (Janu00:00:00 GMT)Īnd the following predefined constants can also be used (available since PHP 5.1.0):.The offset for timezones west of UTC is negative (-43200 to 50400) T - Timezone abbreviations (Examples: EST, MDT).P - Difference to Greenwich time (GMT) in hours:minutes (added in PHP 5.1.3). ![]() O - Difference to Greenwich time (GMT) in hours (Example: +0100). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |