Move displayDate to a global

I’m not sure it was the right thing to do, but it works. Also removed
duplicate setting of the url and document title in one case.