WPDKDateTime::daysToDate PHP 메소드

daysToDate() 공개 정적인 메소드

Return the days to a expiration date from now. Return the days to up ($date > now) or days expired ($date < now).
public static daysToDate ( integer $date ) : float
$date integer A timestamp date
리턴 float
    public static function daysToDate($date)
    {
        $diff = $date - time();
        $days = floatval(round($diff / (60 * 60 * 24)));
        return $days;
    }