In my overlays, I wrap a JavaScript Date object in JsDate:
public final native JsDate getDueDate() ;
However, when I want to use this date in widgets, say DateBox, I need to set the value as a Java date. I could create a Java date from my JsDate, but I believe that adds some overhead.
Date javaDate = new Date(jsDate.getTime());
Is there a cleaner way to achieve this? What is the best way to convert a JsDate object to a Java Date object and vice versa?
Thank you so much
source
share