Change year day functions to use pointers.

Exercise 5-9.