Bug 916316 - Part 3: reimplement date formatting, allow memoization of day formatting. Benchmark tests.
Bug 916316 - Part 4: memoize day formatting during document generation.