\WP_Stager_Integration\Calendar::calculate_timestamp_day_end(int $timestamp): int

Description

Calculates the end timestamp of a day (23:59:59 of the day in the site’s timezone).

Parameters:

ParameterTypeDescription
$timestamp int A Unix timestamp to calculate the day start timestamp for

Returns:

int A Unix timestamp for a day's 00:00:00

Information

Fileclass-calendar.php line 667

Full Code

/**
 * Calculates the end timestamp of a day (23:59:59 of the day in the site’s timezone).
 *
 * @param int   $timestamp  A Unix timestamp to calculate the day start timestamp for
 *
 * @return int  A Unix timestamp for a day's 00:00:00
 */
public static function calculate_timestamp_day_end( $timestamp ) {

    // Type casting
    $timestamp = (int) $timestamp;

    // Get date string
    $date_string = wp_date( 'Y-m-d 23:59:59', $timestamp );

    return self::calculate_local_timestamp( $date_string );
}

šŸ’” If you ever get stuck or have a question, please check our FAQs, our Free Integration Service, our paid Full Integration Service, or reach out to us!

Get WP Stager Integration

šŸŽ Limited offer: Use code WELCOME26 to get your first month for free!