[noun] + 和 + [noun] + 之间
[time] / [number] + 之内
[noun phrase] + 之外
[clause] + 之际
These four words go after a noun, a number or a whole phrase and say where something sits relative to it. They are the formal partners of 中间, 里 and 外, and they can close a longer phrase than those can.
之间 goes after two things joined by 和 or 与, after a plural group, or after two times or numbers.
中间 also means "between", mostly of a physical middle point. For a relationship between people, or a range of times and numbers, the word is 之间: 朋友之间, 同事之间, 十到二十之间.
之内 closes a time span, an amount or an area: 一年之内, 一百米之内, 计划之内.
之外 marks what falls outside a range. 意料之外 – "beyond what anyone expected" – is a common set phrase. With 除了 or 除此 in front it means "apart from", which is its own point (除此之外).
之际 is the most formal of the four. It goes after a clause naming an important moment – a holiday, a parting, an anniversary – and appears in speeches, cards and news.
An ordinary daily event is too small for it; use 的时候.
Like every position word, these come last. Starting with them follows English order.