public static boolean isBefore(Date date1, Date date2) {
		int[] dIng1 = getDateIngredients(date1);
		int day1 = dIng1[0];
		int month1 = dIng1[1];
		int year1 = dIng1[2];

		int[] dIng2 = getDateIngredients(date2);
		int day2 = dIng2[0];
		int month2 = dIng2[1];
		int year2 = dIng2[2];

		if (year1 < year2) {
			return true;
		}
		if (year1 > year2) {
			return false;
		}

		if (year1 == year2 && month1 < month2) {
			return true;
		}
		if (year1 == year2 && month1 > month2) {
			return false;
		}

		if (year1 == year2 && month1 == month2 && day1 < day2) {
			return true;
		}

		return false;
	}