You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Next »

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

getByFormat(format)

Gets the time in the specified format.


Parameter(s):

NameTypeMandatoryDefault Value
formatstring


Return:

TypeDescription
stringThe time in the specified format.


Example:

getByFormat
let st = new SimpleTime();
st.setValue('12:00:00');
ss.info(st.getByFormat('H:m'));

getDisplayValue()

Gets the time in the 'H:i:s' format.


Return:

TypeDescription
StringThe time in 'H:i:s'format.


Example:

getDisplayValue
let st = new SimpleTime();
st.setValue('12:00:00');
ss.info(st.getDisplayValue());

getHourLocalTime()

Returns the hours part of the time using the local time zone.


Return:

TypeDescription
StringThe hours part of the time.


Example:

getHourLocalTime
let st = new SimpleTime();
st.setValue('12:00:00');
ss.info(st.getHourLocalTime());

getHourOfDayLocalTime()

Returns the hours part of the day using the local time zone. The number of the hours is based on a 24-hour clock.


Return:

TypeDescription
StringThe hours using the local time zone.


Example:

getHourOfDayLocalTime
let st = new SimpleTime();
st.setValue('12:00:00');
ss.info(st.getHourOfDayLocalTime());

getHourOfDayUTC()

Returns the hours part of the time using the UTC time zone. The number of hours is based on a 24-hour clock.


Return:

TypeDescription
StringThe hours part of the time.


Example:

getHourOfDayUTC
let st = new SimpleTime();
st.setValue('12:00:00');
ss.info(st.getHourOfDayUTC());

getHourUTC()

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


Return:

TypeDescription
StringThe hours part of the time.


Example:

getHourUTC
let st = new SimpleTime();
st.setValue('12:00:00');
ss.info(st.getHourUTC());

getValue()

Gets the time value stored in the database by the SimpleTime object, using the the internal format (‘H:i:s’) and the system time zone.


Return:

TypeDescription
StringThe time value.


Example:

getValue
let st = new SimpleTime();
st.setValue('12:00:00');
ss.info(st.getValue());

setDisplayValue()

Sets a time value using the current user's display format and time zone.


Parameter(s):

NameTypeMandatoryDefault Value
display valueString


Return:

TypeDescription
VoidThis method does not return a value.


Example:

setDisplayValue
let st = new SimpleTime();
st.setDisplayValue('12:00:00');
ss.info(st.getDisplayValue());

setValue(time)

This method sets the time of the SimpleTime object in the internal time zone.


Parameter(s):

NameTypeMandatoryDefault Value
timeString


Return:

TypeDescription
VoidThis method does not return a value.


Example:

setValue
let st = new SimpleTime();
st.setValue('12:00:00');
ss.info(st.getValue());

  • No labels