PHP: Today, Yesterday, Tomorrow dates

In PHP, we can generate Today, Yesterday, Tomorrow Dates the following way:
 $today = date('Y-m-d');  
 $tomorrow = date('Y-m-d', strtotime('tomorrow'));  
 $yesterday = date('Y-m-d', strtotime('yesterday'));  

No comments:

Post a Comment

Python contextlib for Timing Python code

If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...