Separated time format codes into a new class