private static final Pattern DATETIME = Pattern.compile(
"(\\d{3,})-(\\d{1,2})-(\\d{1,2})\\s+(\\d{1,2}):(\\d{1,2}):(\\d{1,2})");
@Override
public void datetimeProperty(PropertyName name, JsonObject context) throws IOException {
JsonElement prop = property(context, name);
if (prop == null) {
return;
}
String string = prop.getAsString();
Matcher matcher = DATETIME.matcher(string);
if (matcher.matches() == false) {
throw new IOException(MessageFormat.format(
"invalid time property \"{0}\", must be \"{2}\" form, but was \"{1}\"",
name,