See Chronology of the Harry Potter stories for more information on the timeline  In a nutshell it is based on a comment by Nearly Headless Nick in Chamber of Secrets when he invites Harry to his th death day party  and mentions he died Oct    So if it is his th death day Chamber of Secrets takes place in Harrys nd year at Hogwarts when he was  since he had to be  to enter Hogwarts as mentioned in Philosophers Stone Therefore Harrys birth year was   Since Luna and Ginny are both a year behind their birth years are   Voila