Alert date condition

how to make email alert with conditon matching only month and day i try
doc.date_of_birth.month==nowdate().month and doc.date_of_birth.day==nowdate().day
but i got error