Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaScript Suite Documentation
DateTime

DateTime Class Reference

Constructors

Instance Methods

Constructors

new DateTime(parameters)

Initializes an instance of DateTime.

Instance Methods

dateTime.getDay() ⇒ Number

Get the Day

Kind: Instance method of DateTime
Returns: Number - the KEY_DAY value

dateTime.getHour() ⇒ Number

Get the Hour

Kind: Instance method of DateTime
Returns: Number - the KEY_HOUR value

dateTime.getMillisecond() ⇒ Number

Get the Millisecond

Kind: Instance method of DateTime
Returns: Number - the KEY_MILLISECOND value

dateTime.getMinute() ⇒ Number

Get the Minute

Kind: Instance method of DateTime
Returns: Number - the KEY_MINUTE value

dateTime.getMonth() ⇒ Number

Get the Month

Kind: Instance method of DateTime
Returns: Number - the KEY_MONTH value

dateTime.getSecond() ⇒ Number

Get the Second

Kind: Instance method of DateTime
Returns: Number - the KEY_SECOND value

dateTime.getTz_hour() ⇒ Number

Get the Tz_hour

Kind: Instance method of DateTime
Returns: Number - the KEY_TZ_HOUR value

dateTime.getTz_minute() ⇒ Number

Get the Tz_minute

Kind: Instance method of DateTime
Returns: Number - the KEY_TZ_MINUTE value

dateTime.getYear() ⇒ Number

Get the Year

Kind: Instance method of DateTime
Returns: Number - the KEY_YEAR value

dateTime.setDay(day) ⇒ DateTime

Set the Day

Kind: Instance method of DateTime
Returns: DateTime - The class instance for method chaining.

ParamTypeDescription
day Number Day of the month - The desired Day. {'num_min_value': 1, 'num_max_value': 31}

dateTime.setHour(hour) ⇒ DateTime

Set the Hour

Kind: Instance method of DateTime
Returns: DateTime - The class instance for method chaining.

ParamTypeDescription
hour Number Hours part of time. Note that this structure accepts time only in 24 Hr format - The desired Hour. {'num_min_value': 0, 'num_max_value': 23}

dateTime.setMillisecond(millisecond) ⇒ DateTime

Set the Millisecond

Kind: Instance method of DateTime
Returns: DateTime - The class instance for method chaining.

ParamTypeDescription
millisecond Number Milliseconds - The desired Millisecond. {'num_min_value': 0, 'num_max_value': 999}

dateTime.setMinute(minute) ⇒ DateTime

Set the Minute

Kind: Instance method of DateTime
Returns: DateTime - The class instance for method chaining.

ParamTypeDescription
minute Number Minutes part of time - The desired Minute. {'num_min_value': 0, 'num_max_value': 59}

dateTime.setMonth(month) ⇒ DateTime

Set the Month

Kind: Instance method of DateTime
Returns: DateTime - The class instance for method chaining.

ParamTypeDescription
month Number Month of the year - The desired Month. {'num_min_value': 1, 'num_max_value': 12}

dateTime.setSecond(second) ⇒ DateTime

Set the Second

Kind: Instance method of DateTime
Returns: DateTime - The class instance for method chaining.

ParamTypeDescription
second Number Seconds part of time - The desired Second. {'num_min_value': 0, 'num_max_value': 60}

dateTime.setTz_hour(tz_hour) ⇒ DateTime

Set the Tz_hour

Kind: Instance method of DateTime
Returns: DateTime - The class instance for method chaining.

ParamTypeDescription
tz_hour Number Time zone offset in Hours wrt UTC. - The desired Tz_hour. {'default_value': 0, 'num_min_value': -12, 'num_max_value': 14}

dateTime.setTz_minute(tz_minute) ⇒ DateTime

Set the Tz_minute

Kind: Instance method of DateTime
Returns: DateTime - The class instance for method chaining.

ParamTypeDescription
tz_minute Number Time zone offset in Min wrt UTC. - The desired Tz_minute. {'default_value': 0, 'num_min_value': 0, 'num_max_value': 59}

dateTime.setYear(year) ⇒ DateTime

Set the Year

Kind: Instance method of DateTime
Returns: DateTime - The class instance for method chaining.

ParamTypeDescription
year Number The year in YYYY format - The desired Year. {'num_max_value': 4095}
View on GitHub.com
Previous Section Next Section