时间验证


2018-05-19 02:28:08 by sikoay with 0 comments 1 Hits
Blog 1
            $now=strtotime(date('Y-m-d H:i:s'));
            $creationDate = strtotime($promoCode->getCreationDate());
            $expiredDate = strtotime($promoCode->getExpiredDate());
            if($now < $creationDate || $now > $expiredDate)
                throw new \root\logic\exception\AppException("该优惠码只可在 {$promoCode->getCreationDate()} - {$promoCode->getExpiredDate()} 使用!");

Tags:

回复 (0)

Leave a Comment