Closure Library API Documentation
Go to class or file:
duration.js
No description.
Useful links
Source Code
Git
File Location
/goog/date/duration.js
Public
Protected
Private
Global Functions
goog.date.duration.
format
(
durationMs
)
⇒
string
Accepts a duration in milliseconds and outputs an absolute duration time in form of "1 day", "2 hours", "20 minutes", "2 days 1 hour 15 minutes" etc.
Arguments:
durationMs
:
number
Duration in milliseconds.
Returns:
string
The formatted duration.
code »
goog.date.duration.
getDurationMessagePart_
(
pattern
,
count
,
text
)
⇒
string
Gets a duration message part for a time unit.
Arguments:
pattern
:
string
The pattern to apply.
count
:
number
The number of units.
text
:
string
The string to use for amount of units in the message.
Returns:
string
The formatted message part.
code »
Directory date
File Reference