);
$date = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-01';
- $df = (new \DateTime($date))
+ $dateFrom = (new \DateTime($date))
->setTime(0, 0, 0)->format('Y-m-d H:i:s');
- $dt = (new \DateTime($date))
+ $dateTo = (new \DateTime($date))
->modify('last day of this month')->setTime(23, 59, 59)
->format('Y-m-d H:i:s');
$actualProducts = Products1cNomenclatureActuality::find()
->select(['guid'])
- ->where(['<=', 'date_from', $df])
- ->andWhere(['>=', 'date_to', $dt])
+ ->where(['<=', 'date_from', $dateFrom])
+ ->andWhere(['>=', 'date_to', $dateTo])
->asArray()
->column();