support setting date from int, test cases
test function corrections