Formatting Date and Time. Languages: English • Français • 日本語 • Português do Brasil • Русский • 中文(简体) • 中文(繁體) • Italiano • 한국어 • (Add your language) Customizing the Time and Date Certain WordPress tag functions are used to display or return date and time information; the_date() and the_time() are examples of this.
Some of these functions accept a parameter called a format string that allows you to determine how the date is going to be displayed. The format string is a template in which various parts of the date are combined (using "format characters") to generate a date in the format specified. For example, the format string: l, F j, Y creates a date that look like this: Friday, September 24, 2004 Here is what each format character in the string above represents: l = Full name for day of the week (lower-case L). (Commas are read literally.) WordPress is written in the programming language PHP.
Examples Here are some examples of date format and result output. This entry was posted on <? Localization Escaping. Date and Time Formats. NOTE-datetime Submitted to W3C 15 September 1997 This version: Newest version: Authors: Misha Wolf <misha.wolf@reuters.com> Charles Wicksteed <charles.wicksteed@reuters.com> Document Status Status of this document This document is a NOTE made available by the W3 Consortium for discussion only.
This document is a submission to W3C from Reuters Limited. Comments on this document should be sent to datetime-comments@w3.org. Abstract This document defines a profile of ISO 8601, the International Standard for the representation of dates and times. Introduction The International Standard for the representation of dates and times is ISO 8601. ISO 8601 describes a large number of date/time formats. A particular problem with ISO 8601 is that it allows the century to be omitted from years, which is likely to cause trouble as we approach the year 2000.
This profile may be adopted by standards which require an unambiguous representation of dates and times. Formats The formats are as follows. Where: Examples. ISO 8601. ISO 8601 Data elements and interchange formats – Information interchange – Representation of dates and times is an international standard covering the exchange of date and time-related data.
It was issued by the International Organization for Standardization (ISO) and was first published in 1988. The purpose of this standard is to provide an unambiguous and well-defined method of representing dates and times, so as to avoid misinterpretation of numeric representations of dates and times, particularly when data are transferred between countries with different conventions for writing numeric dates and times. In representations for interchange, dates and times are arranged so the largest temporal term (the year) is placed to the left and each successively smaller term is placed to the right of the previous term. History[edit] The first edition of the ISO 8601 standard was published in 1988.
General principles[edit] Dates[edit] Years[edit] Calendar dates[edit] Week dates[edit] Examples: UTC[edit]