Cordoba has the most extreme climate of the major Andalusian cities. Summers are punishing — daytime temperatures regularly past 40°C in July and August, sometimes much higher. Winters are mild but can be surprisingly damp and cool in the evenings. The sweet spots are April–May and late September–October.
May is the month to aim for. The Festival de los Patios runs for around two weeks in early-to-mid May: residents of the old town open their private courtyards to the public and compete for the best display of geraniums, jasmine and fountains. It's a proper Cordoban institution and the city gets booked out months in advance.
The same month brings the Cruces de Mayo in the first week — neighbourhood squares are decked with huge flower-covered crosses and turn into impromptu street parties — and the Feria de Córdoba in the last week, with flamenco, sevillanas, fino, and a casetas-and-fairground site on the edge of town. Across town there's also the Cata de Vino Montilla-Moriles, a wine-tasting fair under a giant tent in the centre.
Other dates worth timing for: Semana Santa (Holy Week, March or April), with nightly processions through the old town; the Festival Internacional de la Guitarra in early July, two weeks of concerts spanning flamenco, classical, jazz and blues; and Carnaval in February, a smaller affair than Cadiz's but still good fun.