Skip to content

Instantly share code, notes, and snippets.

@modemlooper
Created July 13, 2015 15:51
Show Gist options
  • Save modemlooper/a8c4579354df41ed3525 to your computer and use it in GitHub Desktop.
Save modemlooper/a8c4579354df41ed3525 to your computer and use it in GitHub Desktop.
convert date to human readable ( 6 days ago )
sprintf( __( '%1$s ago', 'example' ), human_time_diff( strtotime( $post->post_date ), current_time('timestamp') ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment