Fix EOL dates bug.

No need for a loop and the first array element should be used for the ternary,
not the second.