(CNN) -- When Oregon students go back to school this year, they'll be able to take mental health days without risking an unexcused absence because of a new law that was proposed by a group of high schoolers.
The legislation, which Gov. Kate Brown signed last month, lets students have an excused absence if they miss school because of their mental or behavioral health.
Students from across the state came up with the idea at a leadership camp last year and worked with lobbyists and mental health professionals to push for the change.
Hailey Hardcastle, one of the student advocates, said mental health problems could be just as dangerous as physical ailments and should get the same consideration.
"You take a day off if you have a cold, because resting up will make you feel better, and if you're having a really bad anxiety attack or you're going through a bout of depression, taking a day off can make you feel better," she said.
Students are allowed up to five excused absences in a three-month period under state law.
Teachers usually let students make up tests or other work if they have an excused absence, so that can make a big difference, Hardcastle said.
She says that all through high school, she dealt with anxiety and the pressure to get good grades and get involved in lots of activities so she could get into a good college. But it would leave her feeling overworked.
"That caused me to have a ton of anxiety, and so sometimes, throughout high school, my parents would let me a day off -- a mental health day. I found it super, super helpful." The 18-year-old graduated this year and will be attending the University of Oregon in the fall.
The new law won't be a license to cut class, she said.
"The reality is, kids are already skipping school for mental health reasons. They're just [using] tricks to make it look like you're sick," she said. "They say they have a fever, a headache or something like that to make their parents to call them out of school for physical health when they're really struggling mentally."
She hopes this will encourage kids to be more open with their parents and teachers.
"Then, the adults in their lives will know what's actually going on, and hopefully, students who need help can get help in that way," she said.
Utah enacted a similar law last year.
Oregon's suicide rate reached a record high in 2017, according to a report by the Oregon Health Authority. It found that 825 people died by suicide that year. Suicide was the second leading cause of death in Oregon for 15- to 24-year-olds and the third leading cause of death for children 5 to 14.
Last month, Brown also signed Adi's Act, which requires all Oregon school districts to develop comprehensive suicide prevention policies for students in kindergarten through 12th grade and to address the needs of LGBTQ students and other at-risk groups.
The law is named after Adi Staub, a high school student who died by suicide after she came out as transgender, according to the governor's office.
™ & © 2019 Cable News Network, Inc., a Time Warner Company. All rights reserved.