bIsWorldWarOne = (nY in [1914..1918])
bIsWorldWarTwo = (nY in [1939..1945])
bIsWarYear = bIsWorldWarOne or bIsWorldWarTwo
You can use the or operator in more complex expressions :
bIsWarYear = (nY in [1914..1918]) or (nY in [1939..1945]) // true
Note that the or operator also returns true if both expressions are true. If you want to use an operator in the context one or the other but not both, then you should use the exclusive or, the xor operator.