Location: PHPKode > projects > Agile Toolkit > atk4-atk4-addons-efc6814/misc/lib/Controller/Fancy.php
   Selection of utilities for making thinsg fancy 

   Due to date functions, this controller requries PHP5.3+

class Controller_Fancy extends AbstractController {
    function fancy_datetime($dt,$now='now'){

        $now=new DateTime($now);
        $dt=new DateTime($dt);


            return $dt->format($this->api->getConfig('locale/date','d/m/Y'));

        // Zero days, show fancy format
        if($h>1)return $h.' hours ago';
        if($h)return 'a hour ago';

        if($m>1)return $m.' minutes ago';

        return 'just now';
Return current item: Agile Toolkit