Versions Compared

Key

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

This server class provides methods for performing operations with to operate the SimpleTime class objects, for example, for creating SimpleTime object instances or working with class fields.

SimpleTime(time)


Instantiates 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)


This method gets the allows to get time value in the specified format format you need.


Parameter(s):

NameTypeMandatoryDefault Value
formatstringN"H:i:s"


Return:

TypeDescription
stringThe 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()


This method gets the time in the 'H:i:s' format.


Return:

TypeDescription
StringThe time in '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()


This method returns The output of this methos is the hours part of the time using in the local time zone.


Return:

TypeDescription
StringThe hours part 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()


Returns The output of this method is the hours part of the time using in 12-hour clock in the UTC time zone. The number of hours is based on 12-hour clock. Noon and midnight are shown Noon is represented as 0, not as midnight is 12.


Return:

TypeDescription
StringThe hours part of the time.


Example:

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

getValue()


This method gets The output of this method is the time value stored saved in the database by the SimpleTime object , using having the the internal format (‘H:i:s’) and in the system time zone.


Return:

TypeDescription
StringThe 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)


This method sets defines the time of the SimpleTime object in the internal 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