implementing date class