private static Date parseQuarter(String str) throws ParseException {
		String[] parts = str.trim().split(" ");
		if (parts.length != 2)
			throw new ParseException("Need 2 parts for quater", 0);
		if (parts[0].toUpperCase().charAt(0) != 'Q')
			throw new ParseException("Quater should start with Q", 0);
		int quater = Integer.parseInt(parts[0].substring(1));
		if (quater < 1 || quater > 4)
			throw new ParseException("Quater should be between 1 and 4", 1);
		int year = Integer.parseInt(parts[1]);
			
		Calendar c = Calendar.getInstance();
		c.set(Calendar.YEAR, year);
		c.set(Calendar.DAY_OF_MONTH, 1);
		c.set(Calendar.HOUR_OF_DAY, 0);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		c.set(Calendar.MILLISECOND, 0);
		c.set(Calendar.MONTH, 3*(quater-1));
		
		return c.getTime();
	}