Implements date formatting