Is the year on your W-2 mean thats the year you worked or is that the year you will file?

I found a w-2 online for me but I believe it was for last year,the date on the w-2 says 2017,so my question is the date in the W-2 is the year you worked or the year you are taking it to be filed?