added dateFormat to req and res.locals
added dateFormat middleware
use dateFormat middleware
some pdf changes