\WP_Stager_Integration\Calendar::calculate_timestamp_year_start(int $year): int
\WP_Stager_Integration\Calendar::calculate_timestamp_year_start(int $year): intDescription
Calculates the start timestamp of a given year (00:00:00 in the current site's timezone, first day of the year).
Parameters:
| Parameter | Type | Description |
|---|---|---|
$year | int | The year |
Returns:
int Unix timestamp
Information
| File | class-calendar.php line 785 |
|---|
Full Code
/**
* Calculates the start timestamp of a given year (00:00:00 in the current site's timezone, first day of the year).
*
* @param int $year The year
*
* @return int Unix timestamp
*/
public static function calculate_timestamp_year_start( $year ) {
// Type casting
$year = (int) $year;
// Get first day of year timestamp
return self::calculate_local_timestamp( sprintf( '%d-01-01 00:00:00', $year ) );
}💡 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!

