WP_Privacy_Requests_Table::get_timestamp_as_date() – Convert timestamp for display.
You appear to be a bot. Output may be restricted
Description
Convert timestamp for display.
Usage
$string = WP_Privacy_Requests_Table::get_timestamp_as_date( $timestamp );
Parameters
- $timestamp
- ( int ) required – Event timestamp.
Returns
string Human readable date.
Source
File name: wordpress/wp-admin/includes/class-wp-privacy-requests-table.php
Lines:
1 to 14 of 14
protected function get_timestamp_as_date( $timestamp ) { if ( empty( $timestamp ) ) { return ''; } $time_diff = time() - $timestamp; if ( $time_diff >= 0 && $time_diff < DAY_IN_SECONDS ) { /* translators: %s: Human-readable time difference. */ return sprintf( __( '%s ago' ), human_time_diff( $timestamp ) ); } return date_i18n( get_option( 'date_format' ), $timestamp ); }