This server class provides methods for performing operations with SimpleTime class objects, for example, for creating SimpleTime object instances or working with class fields.
Gets the time in the specified format.
Parameter(s):
Name | Type |
---|---|
format | string |
Return:
Type | Description |
---|---|
string | The time in the specified format. |
Example:
let st = new SimpleTime(); st.setValue('12:00:00'); ss.info(st.getByFormat('H:m')); |
Gets the time in the 'H:i:s' format.
Return:
Type | Description |
---|---|
String | The time in 'H:i:s'format. |
Example:
let st = new SimpleTime(); st.setValue('12:00:00'); ss.info(st.getDisplayValue()); |
Returns the hours part of the time using the local time zone.
Return:
Type | Description |
---|---|
String | The hours part of the time. |
Example:
let st = new SimpleTime(); st.setValue('12:00:00'); ss.info(st.getHourLocalTime()); |
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:
Type | Description |
---|---|
String | The hours using the local time zone. |
Example:
let st = new SimpleTime(); st.setValue('12:00:00'); ss.info(st.getHourOfDayLocalTime()); |
Returns the hours part of the time using the UTC time zone. The number of hours is based on a 24-hour clock.
Return:
Type | Description |
---|---|
String | The hours part of the time. |
Example:
let st = new SimpleTime(); st.setValue('12:00:00'); ss.info(st.getHourOfDayUTC()); |
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:
Type | Description |
---|---|
String | The hours part of the time. |
Example:
let st = new SimpleTime(); st.setValue('12:00:00'); ss.info(st.getHourUTC()); |
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:
Type | Description |
---|---|
String | The time value. |
Example:
let st = new SimpleTime(); st.setValue('12:00:00'); ss.info(st.getValue()); |
Sets a time value using the current user's display format and time zone.
Parameter(s):
Name | Type |
---|---|
String |
Return:
Type | Description |
---|---|
Void | This method does not return a value. |
Example:
let st = new SimpleTime(); st.setDisplayValue('12:00:00'); ss.info(st.getDisplayValue()); |
This method sets the time of the SimpleTime object in the internal time zone.
Parameter(s):
Name | Type |
---|---|
time | String |
Return:
Type | Description |
---|---|
Void | This method does not return a value. |
Example:
let st = new SimpleTime(); st.setValue('12:00:00'); ss.info(st.getValue()); |
Gets the duration between two SimpleTime object values.
Parameter(s):
Name | Type |
---|---|
time1 | SimpleTime |
time2 | SimpleTime |
Return:
Type | Description |
---|---|
String | The duration between two values. |
Example: