Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This server class provides methods to operate the SimpleTime class objects. For example, use this class to create the SimpleTime object instances or work with the class fields.

SimpleTime(time)


Use this constructor to instantiate a new SimpleTime object.

Parameter(s):

NameTypeMandatoryDefault value
timeIntegerN0

Example:

Code Block
languagejs
themeEclipse
titleSimpleTime
linenumberstrue
const reportTime = new SimpleTime();
ss.info(reportTime.getByFormat());
//Info: 03:00:00

getByFormat(format)


Use this method to get time value in the format you need.

Parameter(s):

NameTypeMandatoryDefault value
formatStringN"H:i:s"

Return:

TypeDescription
StringThe This method returns the time in the specified format.

Example:

Code Block
languagejs
themeEclipse
titlegetByFormat
linenumberstrue
const reportTime = new SimpleTime();
reportTime.setValue('12:00:00');
ss.info(reportTime.getByFormat('H:i'));
//Info: 12:00

getDisplayValue()


Use this method to get the time in the 'H:i:s' format.

Return:

TypeDescription
StringThe This method returns the time in the 'H:i:s'format.

Example:

Code Block
languagejs
themeEclipse
titlegetDisplayValue
linenumberstrue
const reportTime = new SimpleTime('12:00:00');
ss.info(reportTime.getDisplayValue());
//Info: 12:00:00

getHourLocalTime()


Use this method to get the hours of the current time in the local time zone.

Return:

TypeDescription
StringThe This method returns the hour(s) of the time.

Example:

Code Block
languagejs
themeEclipse
titlegetHourLocalTime
linenumberstrue
const reportTime = new SimpleTime();
reportTime.setValue('12:00:00');
ss.info(reportTime.getHourLocalTime());
//Info: 12

getHourUTC()


Use this method to get the hours of the current time in UTC.

Return:

TypeDescription
StringThe This method returns the hour(s) of the time in UTC.

Example:

Code Block
languagejs
themeEclipse
titlegetHourUTC
linenumberstrue
const startPoint = new SimpleTime();
startPoint.setValue('12:00:00');
ss.info(startPoint.getHourUTC());
//Info: 09

getValue()


Use this method to get a time value stored in the SimpleTime object that has the internal format (‘H:i:s’) and is in the system time zone.

Return:

TypeDescription
StringThe This method returns the time value.

Example:

Code Block
languagejs
themeEclipse
titlegetValue
linenumberstrue
const startPoint = new SimpleTime('12:00:00');
ss.info(startPoint.getValue());
//Info: 09:00:00

setValue(time)


Use this method to determine the time of the SimpleTime object in the current time zone.

Parameter(s):

NameTypeMandatoryDefault value
timeStringN"00:00:00"

Return:

TypeDescription
VoidThis method does not return a value.

Example:

Code Block
languagejs
themeEclipse
titlesetValue
linenumberstrue
const startPoint = new SimpleTime();
startPoint.setValue('12:00:00');
ss.info(startPoint.getValue());
//Info: 09:00:00


Table of Contents
absoluteUrltrue
classfixedPosition