If the account is being closed and the entire balance withdrawn, I would say your time frame runs from the date of the last deposit. If the withdrawal is partial, then I think using the FIFO (first-in, first-out) method would be permissible, so long as the most recently deposited funds remained on deposit for at least 6 days and you applied the rule consistently.
_________________________
The opinions expressed here are personal and do not represent opinions of my employer.