top

DATE

** This class will not be supported in 2015.

   All functionalities of Date class are more improved, integrating with CAPH. Therefore Date class is not supported since 2015 Smart TV. To use functions of Date class, refer to here.


This class defines the Date functions and the Date information formatting.

Add the following line for Date class into a html file your own :

  script type="text/javascript" src="$MANAGER_WIDGET/Common/af/2.0.0/loader.js">/script>

You can declare Date class like this :

  ex) var date = new Date();


Methods

getLocaleFormatStr

Description
This function returns formatted string for local date.
Parameters
none
Return■String
  - DateTime format string of the TV's target location.
Emulator SupportN
SDK ConstraintNone
Example
var timestr = (new Date()).toFormattedString(Date.getLocaleFormatStr());

toFormattedString

Description
This function changes Date object to formatted string.
Parameters
■formatstr
  - String
  - Time format string.
Return■String
  - Time formatted string of the Date instance.
Emulator SupportN
SDK ConstraintNone
Example
var timestr = (new Date()).toFormattedString('Y/m/d a h:i');