1 : <?php
2 : require_once "JetFormatter.class.php";
3 :
4 :
5 :
6 :
7 :
8 :
9 :
10 :
11 :
12 :
13 :
14 : class JetDateFormatter extends JetFormatter{
15 :
16 : public function __construct($format = null){
17 2 : parent::__construct($format);
18 2 : }
19 :
20 : public function format($value){
21 2 : if(empty($value)){
22 1 : return null;
23 : }
24 2 : if(empty($this->format)){
25 1 : return $value;
26 : }
27 :
28 2 : $unixTimeStamp = strtotime($value);
29 2 : return date($this->format, $unixTimeStamp);
30 : }
31 : }
32 :
33 : ?>
|