return data as class with date objects