Package io.jmix.ui.widget.client
Class JsDate
java.lang.Object
com.google.gwt.core.client.JavaScriptObject
io.jmix.ui.widget.client.JsDate
public class JsDate
extends com.google.gwt.core.client.JavaScriptObject
Wraps a JavaScript Date object.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic JsDatecreate(double milliseconds) Creates a new date with the specified internal representation, which is the number of milliseconds since midnight on January 1st, 1970.final longA wrapper for the JavaScript Date's getTime() method.static DateConverts a JsDate to a Java Date.static JsDateConverts a Java Date to a JsDate.Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString 
- 
Constructor Details
- 
JsDate
protected JsDate() 
 - 
 - 
Method Details
- 
create
Creates a new date with the specified internal representation, which is the number of milliseconds since midnight on January 1st, 1970. This is the same representation returned bygetTime(). - 
toJava
Converts a JsDate to a Java Date. If the JsDate is null, the function returns null.- Parameters:
 js- A JsDate.- Returns:
 - A Java Date object, or null, if js is null.
 
 - 
toJs
Converts a Java Date to a JsDate. If the Date is null, the function returns null.- Parameters:
 java- A Java Date.- Returns:
 - An analogous JsDate, or null if the original Java Date was null.
 
 - 
getTimeMs
public final long getTimeMs()A wrapper for the JavaScript Date's getTime() method.- Returns:
 - The time in milliseconds corresponding to this JsDate.
 
 
 -