Select options for a field

I have a DocType named ‘Test Main’ and in this, I have a field ‘Year’. I want to have two options for that field - the present year and the year before.

Any way to code this up?

Have you tried the Select option in the customise form and add two years as options for the field.

This will do only for the year 2017.
Is there any way that when the date is the 1st of any year, this field gets automatically updated and shows the present year and the year before?