How many countries are in the European Union?
Javascript, 85 83 Bytes
a=d=&gt;d&lt;0?0:d&lt;180?6:d&lt;276?9:d&lt;336?10:d&lt;444?12:d&lt;556?15:d&lt;588?25:d&lt;666?27:d&lt;745?28:27

It takes an input as a float as the months / fractions of months passed since 1958-01-01
(0 for 1958-01-01T00:00:00 and a negative number for any previous date)
(Since number of days from some epoch is allowed, I assume that also a number of months is valid, as well)
Try it Online

80 Bytes
(credits: Arnauld)
a=d=&gt;d&lt;0?0:d&lt;180?6:d&lt;276?9:d&lt;336?10:d&lt;444?12:d&lt;556?15:d&lt;588?25:27+(d&gt;=666&amp;d&lt;745)


Sad to see you go, UK