\WP_Stager_Integration\Calendar::calculate_timestamp_day_start(int $timestamp): int
\WP_Stager_Integration\Calendar::calculate_timestamp_day_start(int $timestamp): intDescription
Calculates the start timestamp of a day (00:00:00 of the day in the siteās timezone).
Parameters:
| Parameter | Type | Description |
|---|---|---|
$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
| File | class-calendar.php line 649 |
|---|
Full Code
/**
* Calculates the start timestamp of a day (00:00:00 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_start( $timestamp ) {
// Type casting
$timestamp = (int) $timestamp;
// Get date string
$date_string = wp_date( 'Y-m-d 00:00:00', $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!

