Created
March 12, 2014 20:52
-
-
Save ericandrewlewis/9516028 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
<?php | |
/** | |
* Return a human-readable date (e.g. April 4, 1968) given a unix timestamp. | |
*/ | |
function unix_timestamp_to_human_readable_date( $unix_timestamp ) { | |
return date( 'F dS Y', $unix_timestamp ); | |
} | |
/** | |
* Output the date of an expectation. | |
* @return {[type]} [description] | |
*/ | |
function the_date_of_expectation() { | |
$unix_timestamp = bp_activity_get_meta( '_expectation_date_unix' ); | |
if ( empty( $unix_timestamp ) ) | |
return false; | |
echo unix_timestamp_to_human_readable_date( $unix_timestamp ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
uh