Now using Moodle's userdate() function rather than date().