quantlib.time.date.Date.day_of_year

Date.day_of_year

The day of the year (one based - Jan 1st = 1).