code: func getDateFromDaynr(daynr uint) (year uint, month uint, day uint) {
  	if daynr <= 365 || daynr >= 3652500 {
  		return
  	}
  
  	year = daynr * 100 / 36525
  	temp := (((year-1)/100 + 1) * 3) / 4
  	dayOfYear := daynr - year*365 - (year-1)/4 + temp
  
  	daysInYear := calcDaysInYear(int(year))
  	for dayOfYear > uint(daysInYear) {
  		dayOfYear -= uint(daysInYear)
  		year++
  		daysInYear = calcDaysInYear(int(year))
  	}
  
  	leapDay := uint(0)
  	if daysInYear == 366 {
  		if dayOfYear > 31+28 {
  			dayOfYear--
  			if dayOfYear == 31+28 {
  				// Handle leapyears leapday.
  				leapDay = 1
  			}
  		}
  	}
  
  	month = 1
  	for _, days := range daysInMonth {
  		if dayOfYear <= uint(days) {
  			break
  		}
  		dayOfYear -= uint(days)
  		month++
  	}
  
  	day = dayOfYear + leapDay
  	return
  }
docs: // getDateFromDaynr changes a daynr to year, month and day,
  // daynr 0 is returned as date 00.00.00