use the request object and not the pagecontext directly to store whether we already included javascript
Extract function to humanize dates so that it can be used after DOM changes