How do I use URL parameters to filter a channel by a date field? How do I filter entries by URL parameters. The url is /booking?month=november&amp;year=2015.

So far I have:

{% set allEntries = craft.entries.section('availability').order('availabilityStartDate').limit(null) %}


where availabilityStartDate is a date field.

How do I return entries that match November and 2015.

Thanks for any ideas or code!
You can pull query string variables using the HttpRequestService, like this:

{% set month = craft.request.query('month') %}
{% set year = craft.request.query('year') %}


Then, you'll need to construct a DateTime object from those query parameters:

{% set queryDate = date([month, year]|join(' ')) %}


...and finally, include that date object in the criteria for craft.entries (notice the &gt;= operator, which means we should get entries with a availabilityStartDate value equal or higher to the queryDate date object:

{% set allEntries = craft.entries.section('availability').order('availabilityStartDate').availabilityStartDate('&gt;= ' ~ queryDate.date).limit(null) %}


EDIT

Filtering out entries with date field values matching the queried month and year exactly is a bit more complicated.

There are probably several ways to approach this, but a thing that works is to use both a start date (i.e. the first day of the queried month) as well as an end date (i.e. the last day of the queried month) for the criteria. 

Being that the queryDate variable actually already refers to the first day of the queried month, we'll just need to add 1 month for the end date:

{% set queryStartDate = date([month, year]|join(' ')) %}
{% set queryEndDate = queryStartDate.date|date_modify('+1 month') %}


And here's the element criteria with both date object statements:

{% set allEntries = craft.entries.section('availability ').order('availabilityStartDate').availabilityStartDate('and', '&gt;= ' ~ queryStartDate.date, '&lt; ' ~ queryEndDate.date).limit(null) %}


Here's everything together, for cohesion:

{# Get month and year query parameters #}
{% set month = craft.request.query('month') %}
{% set year = craft.request.query('year') %}

{# Create DateTime objects for the start date and end date (+1 month) #}
{% set queryStartDate = date([month, year]|join(' ')) %}
{% set queryEndDate = queryStartDate.date|date_modify('+1 month') %}

{# Get the entries #}
{% set allEntries = craft.entries.section('availability ').order('availabilityStartDate').availabilityStartDate('and', '&gt;= ' ~ queryStartDate.date, '&lt; ' ~ queryEndDate.date).limit(null) %}


PS: When you have multiple parameters to craft.entries like this, you might want to consider the object syntax for readability:

{% set allEntries = craft.entries({
    section : 'availability',
    order : 'availabilityStartDate',
    availabilityStartDate : 'and, &gt;= ' ~ queryStartDate.date ~ ', &lt; ' ~ queryEndDate.date,
    limit : null
}) %}