Timothy Aaron
Timothy Aaron

Reputation: 3078

Is it possible to access Javascript's built-in Date object in Bixby Action Javascript?

Ultimately, I'm trying to get the user's day of year, but var now = Date() raises ReferenceError: "Date" is not defined.

Upvotes: 1

Views: 103

Answers (4)

Timothy Aaron
Timothy Aaron

Reputation: 3078

The simple answer turned out to be: No, it was purposely removed.

However, as of ~February 25, 2019, Bixby added support for the native Javascript Date object back into the SDK.

https://bixbydevelopers.com/dev/docs/dev-guide/release-notes/sdk.2019-Q1-SDK-Release-Notes#allowed-javascript-date-object

Upvotes: 1

BixbyDevSupportOne
BixbyDevSupportOne

Reputation: 795

Bixby's built-in library "dates" has a function called getDateTime that might help for now. See if this helps. https://bixbydevelopers.com/dev/docs/reference/JavaScriptAPI/dates

Upvotes: 0

jennie
jennie

Reputation: 45

You might want to have a look at this?

https://github.com/petehaas/bixby.playground.javascript

Upvotes: 0

Kunal Vohra
Kunal Vohra

Reputation: 2846

Here is the reason for error.

You have to use bixby Date here not JS which can be found here with example.

Upvotes: 1

Related Questions