@Test void testInvokeDateDMY() throws Exception { LocalDate localDate = LocalDate.now(); String script = String.format( "new Date(%d,%d,%d)", localDate.getYear(), localDate.getMonth().getValue() - 1, localDate.getDayOfMonth()); long epochMilli = localDate.atStartOfDay(ZoneId.systemDefault()).toInstant().toEpochMilli(); assertEquals(epochMilli, nashornScriptEngine.eval(script)); }
public Object eval(String script) throws ScriptException { return convertNashornValue(scriptEngine.eval(script, new SimpleBindings())); }
NashornScriptEngine { public Object eval(String script) throws ScriptException { return convertNashornValue(scriptEngine.eval(script, new SimpleBindings())); } }
NashornScriptEngine { public Object eval(String script) throws ScriptException { return convertNashornValue(scriptEngine.eval(script, new SimpleBindings())); } NashornScriptEngine(); }
NashornScriptEngine { public Object eval(String script) throws ScriptException { return convertNashornValue(scriptEngine.eval(script, new SimpleBindings())); } NashornScriptEngine(); Object eval(String script); Object eval(Bindings bindings, String expression); ScriptObjectMirror newJSArray(); }
NashornScriptEngine { public Object eval(String script) throws ScriptException { return convertNashornValue(scriptEngine.eval(script, new SimpleBindings())); } NashornScriptEngine(); Object eval(String script); Object eval(Bindings bindings, String expression); ScriptObjectMirror newJSArray();  }