public static void main(String[] args) {
		
		if (args.length != 2 && args.length != 6) {
			CalcInfo.usage();
			System.exit(0);
		}
		
		if (!args[0].equals("-m")) {
			CalcInfo.usage();
			System.exit(0);
		}
		
		//DBInst dbInst	= new DBInst("jdbc:mysql://localhost:3306/stock", "latupa", "latupa");
		DBInst dbInst	= new DBInst("jdbc:mysql://192.168.116.153:3306/stock", "latupa", "latupa");
		
		int mode = Integer.parseInt(args[1]);
		
		if (mode == 1) {
			
			CalcInfo ci = new CalcInfo(dbInst, "");
			
			ci.CalcForDateRange(CalcInfo.DATE_NOW, dbInst);
			//ci.CalcForDateRange("20130307", dbInst);
		}
		else if (mode == 2) {
			if (!args[2].equals("-p")) {
				CalcInfo.usage();
				System.exit(0);
			}
			
			String table_postfix = args[3];
			
			if (!args[4].equals("-d")) {
				CalcInfo.usage();
				System.exit(0);
			}
			
			String date_end = args[5];
			
			CalcInfo ci = new CalcInfo(dbInst, table_postfix);
			ci.CalcForDateRange(date_end, dbInst);
		}
		else {
			CalcInfo.usage();
			System.exit(0);
		}
		
		log.info("proc finish");
	}