-
-
Save brunoalvarenga/7729bb3ed29f8665b02386b9a56669f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Difference for between now and a date in the future | |
$future_timestamp = strtotime( '1st January 2020' ); | |
$difference = human_time_diff( current_time( 'timestamp' ), $future_timestamp ); | |
// Difference between a date in the past and now | |
$past_timestamp = strtotime( '1st January 2016' ); | |
$difference = human_time_diff( $past_timestamp, current_time( 'timestamp' ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment