Example usage for jdk.nashorn.internal.objects NativeDate setTime

List of usage examples for jdk.nashorn.internal.objects NativeDate setTime

Introduction

In this page you can find the example usage for jdk.nashorn.internal.objects NativeDate setTime.

Prototype

@Function(attributes = Attribute.NOT_ENUMERABLE)
public static double setTime(final Object self, final Object time) 

Source Link

Document

ECMA 15.9.5.27 Date.prototype.setTime (time)

Usage

From source file:org.siphon.common.js.JsDateUtil.java

License:Open Source License

public Object toNativeDate(double time) throws ScriptException {
    ScriptObjectMirror m = (ScriptObjectMirror) newDate.eval();
    NativeDate.setTime(m.to(NativeDate.class), time);
    return m;//from  w  w w. ja v  a2 s . com
}