Updated TimeFormatter class to include functionality