Add a formatDate method as a template helper #2.