$timetableFactModels = TimetableFactModel::find()->where([
'admin_id' => $admin_id,
'status' => AdminCheckin::TYPE_END,
- 'date_start' => date('Y-m-d', strtotime($date_start)),
- 'date_end' => date('Y-m-d', strtotime($date_end))
])
- ->andWhere(['<=', 'date_start', date('Y-m-d', strtotime($date_start))])
- ->andWhere(['>=', 'date_end', date('Y-m-d', strtotime($date_end))])
+ ->andWhere(['>=', 'date_start', date('Y-m-d', strtotime($date_start))])
+ ->andWhere(['<=', 'date_end', date('Y-m-d', strtotime($date_end))])
->all();
return $timetableFactModels;
}