The law has always been UNDER 17. The law changed in 2018 with the Tax Cuts Job Act to allow people who could no longer claim their 17 year old to be able to get a $500 Other Dependent Credit.
Prior to that, when your child turned 17, you still were no longer able to claim the child tax credit, but there was not an Other Dependent Credit to offset the loss. See the rules for the child tax credit in 2016 below.
A qualifying child for purposes of the child tax credit is a child who: 1. Is your son, daughter, stepchild, foster child, brother, sister, stepbrother, stepsister, half brother, half sister, or a descendant of any of them (for example, your grandchild, niece, or nephew), 2. Was under age 17 at the end of 2016