<?php

/* @var $this yii\web\View */

use yii\helpers\Html;

$this->title = 'About';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-about">
    <h1><?= Html::encode($this->title) ?></h1>

    <p>This is the About page. You may modify the following file to customize its content:</p>

    <code><?= __FILE__ ?></code>
    <p>

        <?php

        $dt = new DateTime();

        $dt->setTimezone(new DateTimeZone('UTC'));

        $dt->sub( new DateInterval( 'P2D') );


        echo \common\components\DateUtil::formatUtc($dt);

        echo  " - ";

        $ticketType = new \common\models\TicketType();
        $ticketType->time_unit_type = \common\models\TicketType::TIME_UNIT_DAY;
        $ticketType->time_unit_count = 3;

        $dt2 = \common\components\Helper::getTicketExpirationDate($dt, $ticketType);
        echo \common\components\DateUtil::formatUtc($dt2);

//        $dt2 = \common\components\Helper::getTicketExpirationDate($dt, $ticketType);
//        echo \common\components\DateUtil::formatUtc($dt2);


        //        $dt = \common\components\DateUtil::addMonth($dt,1);
        //        echo \common\components\DateUtil::formatUtc($dt);
        //        $dt = \common\components\DateUtil::addMonth($dt,1);
        //        echo \common\components\DateUtil::formatUtc($dt);

        ?>
    </p>
</div>
