<?php
/**
 * Created by PhpStorm.
 * User: sunmoon<i@liming.me>
 * Date: 2019/07/29
 * Time: 上午9:39
 */

namespace common\libs\logging\operate\valueType;

class Date extends AbstractValueType {

    public $format = 'Y-m-d';

    public function result(){
        $value = $this->getValue();
        if(!$value){
            return $this->defaultText;
        }
        return date($this->format, $value);
    }
}