trying to figure out how date maths works