If you want to know how old your favorite celebrity is, look now. A California law says entertainment sites like IMDB must remove birth years if a celeb requests it.

The law will become effective in January. It's an effort to curb age discrimination in the entertainment industry that may cause actors to lose out on jobs.

>> Read more trending stories

And Hollywood seems to have a strong history of ageism. For example, a study from Humana and the University of Southern California found older people are seriously underrepresented in films and that depictions of older people are often stereotyped.

There's also a problem with casting actors who aren't even close to the age of their characters. Some argue actors near the age of the character are losing roles to more high-profile names.

Many complained Jennifer Lawrence was miscast in "Joy" because at the time, she was a 25-year-old playing a character that was supposed to be in her 30s.

And we've seen it in all the "Spider-Man" movies from the past 15 years. Both Tobey Maguire and Andrew Garfield were more than 10 years older than their high school character Peter Parker.

But no group in Hollywood feels the effects of ageism like women, and many celebrities have been vocal about it. Helen Mirren has critiqued the industry for age discrimination saying Hollywood "is all about youth and beauty."

She told The Wrap: "We all watched James Bond as he got more at more geriatric, and his girlfriends got younger and younger. It's so annoying."

Susan SarandonCatherine Zeta-Jones and Kim Cattrall are among many who have also spoken out.

Although the bill met some resistance, a sizeable majority of the California legislature voted to pass it.

iframe width="390" height="219" src="https://www.youtube.com/embed/JDuBMxjifPA" frameborder="0" allowfullscreen>