HTTP/2 301
server: nginx
date: Sun, 28 Dec 2025 06:38:22 GMT
content-type: text/html; charset=UTF-8
x-olaf: ⛄
vary: accept, content-type
x-redirect-by: WordPress
location: https://developer.wordpress.org/reference/functions/comment_date/
x-frame-options: SAMEORIGIN
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 1
HTTP/2 200
server: nginx
date: Sun, 28 Dec 2025 06:38:22 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 1
comment_date() – Function | Developer.WordPress.org
comment_date( string $format = '', int|WP_Comment $comment_id )
Displays the comment date of the current comment.
$formatstringoptionalPHP date format. Defaults to the 'date_format' option.
Default:''
$comment_idint|optionalWP_Comment or ID of the comment for which to print the date.
Default current comment.
| Version | Description |
|---|
| 4.4.0 | Added the ability for $comment_id to also accept a WP_Comment object. |
| 0.71 | Introduced. |
Basic Example
Displays the current comment date in the format “6-30-2004”: