示例#1
0
LightSpeed::JSON::PNode parseDateTime(LightSpeed::JSON::IFactory &factory, ConstStrA text, bool strDate) {
	using namespace LightSpeed;

	if (strDate) return factory.newValue(text);

	try {
		TimeStamp tms = parseDateTime(text);
		return factory.newValue(tms.getFloat());
	} catch (const InvalidDateTimeFormat &e) {
		return factory.newValue(e.getMessage());
	}

}