Beispiel #1
0
void Date::set(const WeakString &wStr)
{
	WeakString val = wStr.trim();

	int year, month, date;

	//시분초까지 있을 때
	if (val.find(" ") != std::string::npos)
		val = val.between(std::string(), " ");

	//년월일 설정
	vector<WeakString> &ymdVec = val.split("-");
	year = stoi(ymdVec[0].str());
	month = stoi(ymdVec[1].str());
	date = stoi(ymdVec[2].str());

	set(year, month, date);
}