Skip to content

Instantly share code, notes, and snippets.

@ericandrewlewis
Created March 12, 2014 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ericandrewlewis/9516028 to your computer and use it in GitHub Desktop.
Save ericandrewlewis/9516028 to your computer and use it in GitHub Desktop.
<?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 );
}
Copy link

ghost commented Mar 12, 2014

uh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment