<?php


namespace frontend\modules\api\controllers;


use common\util\Holiday;
use frontend\modules\api\components\BaseAdminController;
use yii\web\Response;

class UtilController extends BaseAdminController
{
    /**
     * 时间特征查询
     * @param $time
     * @return Response
     */
    public function actionTimeFeature($time)
    {
        list($day_type, $time_type) = Holiday::getDayTypeAndTimeType($time);
        $data["data"] = [
            "day_type" => $day_type,
            "time_type" => $time_type,
        ];
        return $this->asJson($data);
    }
}