If that's real and in the US that's age discrimination and you can sue, and easily win, even if they say it's not your age, but the date of your birthday it still would fall under discrimination based on age.
In the US age discrimination is only when you discriminate against someone 40 or older.
Discriminating against someone for being under 40, or discriminating against someone for their particular birthday is not considered a protected class.
It’s silly but it addresses a real problem. You don’t see job ads stating no
women, Blacks, Mexicans, people with disabilities, etc. (This was very much a thing in the not too distant past, just look at job ads in the USA from the 60s)
Age was added later because employers prefer hiring younger people as they can often pay them significantly less and get more work out of them because of their inexperience.
There are examples of employers firing all of their older workers to save money (though many of these companies turned out as terrible for the long term health of the company).
Older people tend to vote more and the state doesn’t want to pay unemployment to people so hence the law was amended.
This is just another example of age and deviousness triumphing over youth and enthusiasm.