code: func calcDaynr(year, month, day int) int {
  	if year == 0 && month == 0 {
  		return 0
  	}
  
  	delsum := 365*year + 31*(month-1) + day
  	if month <= 2 {
  		year--
  	} else {
  		delsum -= (month*4 + 23) / 10
  	}
  	temp := ((year/100 + 1) * 3) / 4
  	return delsum + year/4 - temp
  }
docs: // calcDaynr calculates days since 0000-00-00.