Title: date_i18n
Published: April 25, 2014
Last modified: May 20, 2026

---

# apply_filters( ‘date_i18n’, string $date, string $format, int $timestamp, bool $gmt )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/date_i18n/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/date_i18n/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/date_i18n/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/date_i18n/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/date_i18n/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/hooks/date_i18n/?output_format=md#wp--skip-link--target)

Filters the date formatted based on the locale.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/date_i18n/?output_format=md#parameters)󠁿

 `$date`string

Formatted date string.

`$format`string

Format to display the date.

`$timestamp`int

A sum of Unix timestamp and timezone offset in seconds.
 Might be without offset
if input omitted timestamp but requested GMT.

`$gmt`bool

Whether to use GMT timezone. Only applies if timestamp was not provided.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/date_i18n/?output_format=md#source)󠁿

    ```php
    $date = apply_filters( 'date_i18n', $date, $format, $timestamp, $gmt );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/functions.php#L220)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/functions.php#L220-L220)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/date_i18n/?output_format=md#related)󠁿

| Used by | Description | 
| [date_i18n()](https://developer.wordpress.org/reference/functions/date_i18n/)`wp-includes/functions.php` |

Retrieves the date in localized format, based on a sum of Unix timestamp and timezone offset in seconds.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/date_i18n/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.8.0](https://developer.wordpress.org/reference/since/2.8.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/date_i18n/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/hooks/date_i18n/?output_format=md#comment-content-5615)
 2.   [thejaydip](https://profiles.wordpress.org/iamjaydip/)  [  4 years ago  ](https://developer.wordpress.org/reference/hooks/date_i18n/#comment-5615)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdate_i18n%2F%23comment-5615)
    Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdate_i18n%2F%23comment-5615)
 4. **Basic Example**
 5.     ```php
        echo date_i18n( __( 'M j, Y @ G:i', 'textdomain' ), strtotime( 'now' ), true );
        ```
    
 6.  * I would suggest using time() instead of strtotime because if you need the actual
       timestamp it is the way to go.
     * [mumbomedia](https://profiles.wordpress.org/mumbomedia/) [3 years ago](https://developer.wordpress.org/reference/hooks/date_i18n/#comment-6264)
 7.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdate_i18n%2F%3Freplytocom%3D5615%23feedback-editor-5615)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdate_i18n%2F)
before being able to contribute a note or feedback.