How to get all entries posted within a specific year? I am trying to get all entries posted from 2018 and only 2018. All the other methods I've seen are for from a specific date or between two dates. Is there a simple way to get all posts from 2018 without having to specify get all entries between 1 January 2018 and 31 December 2018?

The markup below is where I have got to, but this is getting all entries from 2018 onwards. But when I change the &gt;= parameter to == it appears to break it.

{% set event = craft.entries.section('events').startDate('&gt;=' ~ formYear).one() %}
This should do what you're looking for:

{% set event = craft.entries({
    section: 'events',
    startDate: 'and, &gt;= ' ~ formYear ~ ', &lt; ' ~ (formYear + 1)
}).one() %}