1. According to the year and the number of the date in a year(from 1 to 365 or 366, if its a leap year) determine the date(day, month). For example, in 2012 61 and in 2013 60- it will be the 1st of march(1(day) 3(month)).
2. According to the date(day, month, year, for example 6,5,2012) determine the number of the day in this year (from 1 to 365 or 366, if its a leap year).