During Nearly Headless Nick's deathday party, it is commented he has been dead for 500 years. The cake for his deathday said he died on October 31,1492. That puts the story in 1992 during Harry's 2nd year.
Another reference to this is when Harry sees his parents gravestone on Christmas Eve in the 7th book. The gravestone says they died on October 31,1981. It had been 16 years since they had died. That puts the story from 1991-1998.