function for calculating %age of year from a calendar date

useful for inputing to Beauti