fix day_of_week method for date class
add test case for date class