code: private void normalizeDate() {
  		while (day <= 0) {
  			int days = TimeUtils.yearLength(month > 2 ? year : year - 1);
  			day += days;
  			--year;
  		}
  
  		if (month <= 0) {
  			int years = month / 12 - 1;
  			year += years;
  			month -= 12 * years;
  		} else if (month > 12) {
  			int years = (month - 1) / 12;
  			year += years;
  			month -= 12 * years;
  		}
  
  		while (true) {
  			if (month == 1) {
  				int yearLength = TimeUtils.yearLength(year);
  				if (day > yearLength) {
  					++year;
  					day -= yearLength;
  				}
  			}
  
  			int monthLength = TimeUtils.monthLength(year, month);
  			if (day <= monthLength) {
  				break;
  			}
  
  			day -= monthLength;
  			if (++month > 12) {
  				month -= 12;
  				++year;
  			}
  		}
  	}
docs: Makes sure that the date fields are in the proper ranges (for example,
  converts 32 January to 1 February).