Function
Static Public Summary | ||
public |
captureStack(): * captures a stacktrace at the current code execution point |
|
public |
days(n: Integer): Integer returns |
|
public |
hours(n: Integer): Integer returns |
|
public |
returns a humanized time representation of the difference between two millisecond dates |
|
public |
kill(): * Drains the thinky database pool |
|
public |
minutes(n: Integer): Integer returns |
|
public |
compares a Date Object to a millisecond representation |
|
public |
seconds(n: Integer): Integer returns |
|
public |
secondsAgo(n: Integer): Integer returns how many seconds have elapsed since |
Static Public
public captureStack(): * source
import {captureStack} from 'wyst/es6/Errors/index.js'
captures a stacktrace at the current code execution point
Return:
* |
public days(n: Integer): Integer source
import {days} from 'wyst/es6/utils/Time.js'
returns n
number of days converted to milliseconds.
Params:
Name | Type | Attribute | Description |
n | Integer | the number of days |
Return:
Integer |
Example:
days(1) // 1000 * 60 * 60 * 24
public hours(n: Integer): Integer source
import {hours} from 'wyst/es6/utils/Time.js'
returns n
number of hours converted to milliseconds
Params:
Name | Type | Attribute | Description |
n | Integer | the number of hours |
Return:
Integer |
Example:
hours(1) // 1000 * 60 * 60
public humanize(start: Integer): Object source
import {humanize} from 'wyst/es6/utils/Time.js'
returns a humanized time representation of the difference between two millisecond dates
Params:
Name | Type | Attribute | Description |
start | Integer | the start date in number of milliseconds since 1 January, 1970 UTC |
|
Date.now() | Integer |
|
end the end date in number of milliseconds |
public kill(): * source
import {kill} from 'wyst/es6/thinky.js'
Drains the thinky database pool
Return:
* |
public minutes(n: Integer): Integer source
import {minutes} from 'wyst/es6/utils/Time.js'
returns n
number of minutes converted to milliseconds
Params:
Name | Type | Attribute | Description |
n | Integer | the number of minutes |
Return:
Integer |
Example:
minutes(1) // 1000 * 60
public olderThan(date: Date, milliDate: Integer): Boolean source
import {olderThan} from 'wyst/es6/utils/Time.js'
compares a Date Object to a millisecond representation
Params:
Name | Type | Attribute | Description |
date | Date | a Date object |
|
milliDate | Integer | a millisecond representation of a Date |
public seconds(n: Integer): Integer source
import {seconds} from 'wyst/es6/utils/Time.js'
returns n
number of seconds converted to milliseconds
Params:
Name | Type | Attribute | Description |
n | Integer | the number of seconds |
Return:
Integer |
Example:
seconds(2) // 2000
public secondsAgo(n: Integer): Integer source
import {secondsAgo} from 'wyst/es6/utils/Time.js'
returns how many seconds have elapsed since n
compared to Date.now()
Params:
Name | Type | Attribute | Description |
n | Integer | the start date in milliseconds |
Return:
Integer | the number of seconds that have elapsed |