Bugzilla #53185: Unify date formatting between FOP and XGC as well as tidying the date format code. Submitted by Robert Meyer.