def get_dated_items(self):
        year = self.get_year()
        month = self.get_month()

        date_field = self.get_date_field()
        date = _date_from_string(year, self.get_year_format(),
                                 month, self.get_month_format())

        since = self._make_date_lookup_arg(date)
        until = self._make_date_lookup_arg(self._get_next_month(date))
        lookup_kwargs = {
            '%s__gte' % date_field: since,
            '%s__lt' % date_field: until,
        }

        qs = self.get_dated_queryset(**lookup_kwargs)
        date_list = self.get_date_list(qs)

        return (date_list, qs, {
            'month': date,
            'next_month': self.get_next_month(date),
            'previous_month': self.get_previous_month(date),
        })
main solution function
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/views/generic/dates.py/BaseMonthArchiveView.get_dated_items--crossover with--dataset/ETHPy150Open algorhythms/HackerRankAlgorithms/Closest Numbers.py/Solution.solve