How do you say

I booked train tickets three months in advance online.

..in Chinese?

我在网上预定了三个月的火车票。

wǒ zài wǎng shàng yù dìng le sān gè yuè de huǒ chē piào 。

How do you say "I plan to buy a new sofa within a month." in Chinese?