Outputs the date in iso8601 format for xml files.
Source
function the_date_xml() {
echo mysql2date( 'Y-m-d', get_post()->post_date, false );
}
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |
CARVIEW |
Outputs the date in iso8601 format for xml files.
function the_date_xml() {
echo mysql2date( 'Y-m-d', get_post()->post_date, false );
}
Uses | Description |
---|---|
mysql2date()wp-includes/functions.php | Converts given MySQL date string into a different format. |
get_post()wp-includes/post.php | Retrieves post data given a post ID or post object. |
Version | Description |
---|---|
1.0.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
Outputs the date in iso8601 format (especially used for XML files)