adjusted dates function for leap years