The IRS determines the custodial parent based on the time the child spends with each parent.