It seems to be working OK if it's just defined here—I just changed the x[3] to x.date without incident, and the templates use the x.whatever stuff too.

Thanks for catching this [3], though!  I'm looking through to make sure I've replaced them all, so do let me know if I've missed any others