rewrite date to position calculating for yearview to a more reliable method