Adds the day number function.