comment_date

The timeline below displays how wordpress function comment_date has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.2

/**
 * Displays the comment date of the current comment.
 *
 * @since 0.71
 * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
 *
 * @param string         $format     Optional. PHP date format. Defaults to the 'date_format' option.
 * @param int|WP_Comment $comment_id WP_Comment or ID of the comment for which to print the date.
 *                                   Default current comment.
 */
function comment_date($format = '', $comment_id = 0)
{
    echo get_comment_date($format, $comment_id);
}

WordPress Version: 5.6

/**
 * Displays the comment date of the current comment.
 *
 * @since 0.71
 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
 *
 * @param string         $format     Optional. PHP date format. Defaults to the 'date_format' option.
 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the date.
 *                                   Default current comment.
 */
function comment_date($format = '', $comment_ID = 0)
{
    echo get_comment_date($format, $comment_ID);
}

WordPress Version: 5.4

/**
 * Displays the comment date of the current comment.
 *
 * @since 0.71
 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
 *
 * @param string         $format     Optional. The format of the date. Default user's settings.
 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the date.
 *                                   Default current comment.
 */
function comment_date($format = '', $comment_ID = 0)
{
    echo get_comment_date($format, $comment_ID);
}

WordPress Version: 4.4

/**
 * Display the comment date of the current comment.
 *
 * @since 0.71
 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
 *
 * @param string         $d          Optional. The format of the date. Default user's settings.
 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the date.
 *                                   Default current comment.
 */
function comment_date($d = '', $comment_ID = 0)
{
    echo get_comment_date($d, $comment_ID);
}

WordPress Version: 3.9

/**
 * Display the comment date of the current comment.
 *
 * @since 0.71
 *
 * @param string $d          Optional. The format of the date. Default user's settings.
 * @param int    $comment_ID ID of the comment for which to print the date. Default current comment.
 */
function comment_date($d = '', $comment_ID = 0)
{
    echo get_comment_date($d, $comment_ID);
}

WordPress Version: 3.7

/**
 * Display the comment date of the current comment.
 *
 * @since 0.71
 *
 * @param string $d          Optional. The format of the date. Default user's settings.
 * @param int    $comment_ID Optional. The ID of the comment for which to print the date. Default current comment.
 */
function comment_date($d = '', $comment_ID = 0)
{
    echo get_comment_date($d, $comment_ID);
}