Can I claim a child that doesn't live with me, but I provided their full living expenses for 8 months of the year?

The child did live with me until 3 weeks ago.