private Result<IValue> createVisitedDate(IEvaluator<Result<IValue>> eval, String datePart, org.rascalmpl.ast.JustDate.Lexical x) {
try {
datePart.replaceAll("-", "");
StandardTextReader parser = new StandardTextReader();
IValue result = parser.read(VF, new StringReader("$" + datePart));
return makeResult(TF.dateTimeType(), result, eval);
} catch (FactTypeUseException e) {
throw new DateTimeSyntax(e.getMessage(), eval.getCurrentAST().getLocation());
} catch (FactParseError e) {
throw new DateTimeSyntax(e.getMessage(), eval.getCurrentAST().getLocation());