Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get comment time

This page redirects to an external site: https://developer.wordpress.org/reference/functions/get_comment_time/

Description

Retrieve the comment time of the current comment. This tag must be within The Loop, or a comment loop.

Use comment_time() to display the value.

Usage

<code style="color: #000000"><span style="color: #0000BB"><?php get_comment_time</span><span style="color: #007700">( </span><span style="color: #0000BB">$d</span><span style="color: #007700">, </span><span style="color: #0000BB">$gmt </span><span style="color: #007700">= </span><span style="color: #0000BB">false</span><span style="color: #007700">, </span><span style="color: #0000BB">$translate </span><span style="color: #007700">= </span><span style="color: #0000BB">true </span><span style="color: #007700">); </span><span style="color: #0000BB">?></span></code>

Parameters

$d
(string) (optional) The format of the time
Default: WordPress default time setting
$gmt
(boolean) (optional) Whether to use the GMT date
Default: false
$translate
(boolean) (optional) Whether to translate the time (for use in feeds)
Default: true

Return Values

(string) 
The formatted time

Examples

Notes

Change Log

Since: 1.5.0

Source File

get_comment_time() is located in wp-includes/comment-template.php

Related