e.g. Two 17 year-olds are dating and sexually active. One is going to turn 18 first. The day after that person's birthday it does not go from consensual to criminal.
By extension, a 17 & 18 year-old start to date and have relations it is treated the same. It's called a "Close-in-age Exemption."