As I understand it, the Chinese calendar works by rotating through a fixed series of 12 animals.
Each year (2001, 2002) relates to one animal, so anyone born 1 Jan 2001 would be the same animal as someone born 31 Dec 2001.
If the above is true then simply dividing the year by 12 and counting the remainder will work.
mod(2004, 12); = 0 as does mod(1992, 12); (Monkey?)
mod(2003, 12); = 1 as does mod(1991, 12); (Sheep?)
The coding is good, even if my knowledge of the Chinese calendar isn't.
Steve