support leap year

http://manage.dimagi.com/default.asp?89699#512723