List Only Available Times/Dates in Solspace Calendar I have the following code that will output the UNAVAILABLE (previously booked) times of a Target Date. How would i edit this to output (in 30 minute increments) only the AVAILABLE times with Solspace Calendar?

{% set targetDate = "2016/09/27" %}
{% set calendarHandle = "default" %}
{% set day = craft.calendar.day({
     date: targetDate,
     calendar: calendarHandle
}) %}

{% for event in day.events %}
    {{ event.startDate.format('g:i a') }} - {{ event.endDate.format('g:i a') }}
{% endfor %}
Edited to provide a cleaner solution:

This code will display different contents for available times and unavailable times in 30 min increments, and makes no assumption on how long your events are.

{% set targetDate = "today" %}

{% set events = craft.calendar.events({
    dateRangeStart: targetDate,
    dateRangeEnd: targetDate
}) %}


{% for hour in craft.calendar.day({date: targetDate}) %}
    {% set dateFirstHalfHour = hour.date.copy.addMinutes(30) %}
    {% set dateSecondHalfHour = hour.date.copy.addMinutes(60) %}

    {% set hasEventsInFirstHalf = false %}
    {% set hasEventsInSecondHalf = false %}
    {% for event in events %}
        {% if hour.date &gt;= event.startDate and hour.date &lt; event.endDate %}
            {% set hasEventsInFirstHalf = true %}
        {% endif %}

        {% if dateFirstHalfHour &gt;= event.startDate and dateFirstHalfHour &lt; event.endDate %}
            {% set hasEventsInSecondHalf = true %}
        {% endif %}
    {% endfor %}

    &lt;div&gt;
        {{ hour.date.format("H:i") }} - {{ hasEventsInFirstHalf ? "unavailable" : "available" }}
    &lt;/div&gt;
    &lt;div&gt;
        {{ dateFirstHalfHour.format("H:i") }} - {{ hasEventsInSecondHalf ? "unavailable" : "available" }}
    &lt;/div&gt;

{% endfor %}