extract formatting dates to a module and place at top level again