def datetime_xrange(begin, end, step):
    """
    This returns a datetime range generator analogous to the builtin integer function
    range(begin_inclusive, end_exclusive, step)
    :type begin: datetime.datetime
    :type end: datetime.datetime
    :type step: datetime.timedelta
    :return: A list of date time objects.
    :rtype: generator
    """
    current_datetime_var = begin
    while current_datetime_var < end:
        yield current_datetime_var
        current_datetime_var = current_datetime_var + step
