Fix PHP Fatal error:  Using $this when not in object context

Change $this->year to right context $year.
Merge pull request #1 from andersbryrup/fix-year-variable

Fix PHP Fatal error:  Using $this when not in object context