Constructor
# abstract new State(key)
Parameters:
Name | Type | Description |
---|---|---|
key |
string
|
The local storage key. |
Members
Methods
# static remainingSecondsToTime(seconds) → {number}
Converts a number of seconds into a timestamp.
Parameters:
Name | Type | Description |
---|---|---|
seconds |
number
|
Remaining seconds to be converted into a timestamp. |
number
# static timeToRemainingSeconds(time) → {number}
Converts a timestamp into remaining seconds that you can count down.
Parameters:
Name | Type | Description |
---|---|---|
time |
number
|
Timestamp in seconds (since January 1, 1970 00:00:00 UTC). |
number