That's just a little clunky - and you could create nicer tests, e.g. stipulating better limits for the year. There are loads of ways to do it. You could use mktime() and date(), or even use the DateTime object.
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: