According to IRS Pub 503 https://www.irs.gov/pub/irs-pdf/p503.pdf:
Person qualifying for part of year. You determine a person's qualifying status each day. For example, if the person for whom you pay child and dependent care expenses no longer qualifies on September 16, count only those expenses through September 15.
So, in your case, you should be able to claim eligible dependent care costs through Aug 16. On Aug 17 and thereafter, no go.
Hope that helps.