created a class for reading date as a string