moved time formatting functions to object