Uses
Uses | Description |
---|---|
wp-includes/functions.php: mysql2date() | Convert given MySQL date string into a different format. |
wp-includes/post.php: get_post() | Retrieves post data given a post ID or post object. |
Outputs the date in iso8601 format for xml files.
File: wp-includes/general-template.php
function the_date_xml() { echo mysql2date( 'Y-m-d', get_post()->post_date, false ); }
Version | Description |
---|---|
1.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/the_date_xml