Skip to content

Instantly share code, notes, and snippets.

@pmeissner
Created December 4, 2013 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmeissner/7787247 to your computer and use it in GitHub Desktop.
Save pmeissner/7787247 to your computer and use it in GitHub Desktop.
Countdown
<?php
class Plugin_Journey extends Plugin {
var $meta = array(
'name' => 'Journey',
'version' => '1.0',
'author' => 'Philip Meissner of Creative Loupe',
'author_url' => 'http://lou.pe'
);
public function countdown()
{
$start_date = $this->fetchParam('start', 0);
$now = time();
$your_date = strtotime($start_date);
$result = $your_date - $now;
return $result;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment