I think the proper syntax is to access the fields using their indexes, as ordered in your fields list. For example:
cursorD = arcpy.da.UpdateCursor(featureclass,["month", "day", "dayoftheyear"])
for updateRowD in cursorD:
if updateRowD[0] == 1:
updateRowD[2] = updateRowD[1]
elif updateRowD[0] == 2:
updateRowD[2] = updateRowD[1] + 31
elif updateRowD[0] == 3:
updateRowD[2] = updateRowD[1] + 59
cursorD.updateRow(updateRowD)
del updateRowD
del cursorD
The del statements are used to clear potential locks on the targeted feature class. You might consider creating the cursor using a with statement so that locks are cleared automatically:
with arcpy.da.UpdateCursor(featureclass,["month", "day", "dayoftheyear"]) as cursorD:
for updateRowD in cursorD:
if updateRowD[0] == 1:
updateRowD[2] = updateRowD[1]
elif updateRowD[0] == 2:
updateRowD[2] = updateRowD[1] + 31
elif updateRowD[0] == 3:
updateRowD[2] = updateRowD[1] + 59
cursorD.updateRow(updateRowD)
You may also want to revise your print statements, since they'll print at every row.