Contains all of the business rules needed for generating time stamps, reformatting time stamps and computing time durations.
- Copyright:
- Copyright © 2022-… by Seth Hollingsead. All rights reserved
- Source:
Requires
Methods
(inner) computeDeltaTime(inputData, inputMetaData) → {integer}
Computes the time difference between two different date-time stamps in milliseconds.
Parameters:
| Name | Type | Description |
|---|---|---|
inputData |
string | The start of the time period that should be computed. |
inputMetaData |
string | The end of the time period that should be computed. |
Returns:
The difference between the beginning time and ending time in milliseconds.
- Type
- integer
(inner) getNowMoment(inputData, inputMetaData) → {string}
Returns a time stamp string formatted according to the input formatting string.
Parameters:
| Name | Type | Description |
|---|---|---|
inputData |
string | The formatting string, that tells moment in what format to return the value for the day, month, year, hour, minute, second and millisecond. |
inputMetaData |
string | Not used for this business rule. |
Returns:
A time stamp string that has been formatted according to the input format.
- Type
- string
(inner) reformatDeltaTime(inputData, inputMetaData) → {string}
Converts a time interval into a different kind of format.
Parameters:
| Name | Type | Description |
|---|---|---|
inputData |
integer | A time interval measured in milliseconds. |
inputMetaData |
string | The formatting template that should be used to format the time interval. |
Returns:
A time interval formatted according to the input format template string.
- Type
- string
(inner) sleep(inputData, inputMetaData) → {void}
Causes the JavaScript code to wait for a period of time defined by the input.
Parameters:
| Name | Type | Description |
|---|---|---|
inputData |
integer | The number of milliseconds that the system should sleep for. |
inputMetaData |
string | Not used for this business rule. |
Returns:
- Type
- void