Best time to take a childbirth class?

The only options available are when I'm either 27 weeks, 29 weeks, 36 and closer to 37 weeks. Which one would be the best time? I'm already signed up for a tour of the hospital at 29 weeks so maybe just get both done in the same week? Or spread it out? Is it better to take the childbirth class earlier or super close to your due date. It's $35 so I want to pick the right date