$hour = 12;
$today = strtotime($hour . ':00:00');
$yesterday = strtotime('-1 day', $today);
$dayBeforeYesterday = strtotime('-1 day', $yesterday);
More Related Contents:
- Display which day it is? sunday or monday “php coding”? [closed]
- Converting timestamp to time ago in PHP e.g 1 day ago, 2 days ago…
- Timezone conversion in php
- PHP How to find the time elapsed since a date time? [duplicate]
- How to convert date to timestamp in PHP?
- PHP: producing relative date/time from timestamps
- Getting date format m-d-Y H:i:s.u from milliseconds
- MySQL datetime fields and daylight savings time — how do I reference the “extra” hour?
- Accessing dates in PHP beyond 2038
- best practice to generate random token for forgot password
- What is a Unix timestamp and why use it?
- How to generate random date between two dates using php?
- NOW() function in PHP
- How to convert a 13 digit Unix Timestamp to Date and time?
- Using MySQL’s TIMESTAMP vs storing timestamps directly
- Why do timestamps have a limit to 2038?
- Formatting an SQL timestamp with PHP
- Storing time information: Timezone required?
- How to convert MySQL time to UNIX timestamp using PHP?
- Subtracting a certain number of hours, days, months or years from date
- Preventing Directory Traversal in PHP but allowing paths
- Using PHP with Socket.io
- Is it possible to overwrite a function in PHP
- Diagnosing Memory Leaks – Allowed memory size of # bytes exhausted
- Which $_SERVER variables are safe?
- Laravel Eloquent select all rows with max created_at
- unit testing and Static methods
- Which coding style you use for ternary operator? [closed]
- Replacing \r\n with PHP
- Limit download speed using PHP