DRY up date/time formatting.