NativeScript / android

NativeScript for Android using v8
https://docs.nativescript.org/guide/android-marshalling
Apache License 2.0
522 stars 134 forks source link

Marshal JavaScript Date to java.util.Date #1319

Open vtrifonov opened 5 years ago

vtrifonov commented 5 years ago

Add marshalling of javascript Date object ot Java java.util.Date when calling a native method accepting java.util.Date argument.

vmutafov commented 5 years ago

It's probably a good idea to marshal the JS Date object to a corresponding java.time class too, depending on the case. Java's Date and Calendar classes are the old APIs for working with date/time, the new ones are in the java.time package and are the recommended ones nowadays.