Class: PaywallTimeUnit

PaywallTimeUnit(timeInMS)

new PaywallTimeUnit(timeInMS)

PaywallTimeUnit is a help class to return remaining time in time units such as seconds, minutes, days etc. With this object it is possible to easy display a string of remaining or time until in form HH:MM:SS etc.
Parameters:
Name Type Description
timeInMS number time difference in milliseconds, if less than 0 it will be set to 0.
Source:

Methods

(static) asMS() → {number}

Source:
Returns:
number of milliseconds of remaining time. This is the total number of milliseconds not from the last second and is not padded.
Type
number

(static) days() → {number}

Method that returns the remaining days.
Source:
Returns:
remaining time in days without padding.
Type
number

(static) hours() → {string}

Help method to display the hours part of remaining time. The method returns the number of hours in addition to remaining days.
Source:
Returns:
remaining time in hours as two characters. i.e 01 or 12
Type
string

(static) minutes() → {string}

Help method to display the minutes part of remaining time. The method returns the number of minutes in addition to remaining hours.
Source:
Returns:
remaining time in minutes as two characters. i.e 01 or 12
Type
string

(static) seconds() → {string}

Help method to display the seconds part of remaining time. The method returns the number of seconds in addition to remaining minutes.
Source:
Returns:
remaining time in seconds as two characters. i.e 01 or 12
Type
string