/**
  * Create query from the beginning to the end of certain day
  * @param array $layout_def
  * @param SugarDateTime $day
  */
 protected function queryDay($layout_def, SugarDateTime $day)
 {
     $begin = $day->get_day_begin();
     $end = $day->get_day_end();
     return $this->get_start_end_date_filter($layout_def, $begin->asDb(), $end->asDb());
 }