Great, now everybody will laugh when you try to name a variable “year”.
(That said, it's one that's so common it's worth learning the keyboard shortcut for. On a Mac it's "opt-n, n".)
setxkbmap us -variant intl -option compose:rwin]
Press altgr or right win key + [aeiou] or n.