Class Index | File Index

Classes


Class pv.Format.time


Extends pv.Format.
Represents a time format, converting between a number representing a duration in milliseconds, and a string. Two types of time formats are supported: "short" and "long". The short format type returns a string such as "3.3 days" or "12.1 minutes", while the long format returns "13:04:12" or similar.
Defined in: TimeFormat.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Returns a time format of the given type, either "short" or "long".
Method Summary
Method Attributes Method Name and Description
 
format(t)
Formats the specified time, returning the string representation.
 
parse(s)
Parses the specified string, returning the time in milliseconds.
Class Detail
pv.Format.time(type)
Returns a time format of the given type, either "short" or "long".
Parameters:
{string} type
the type; "short" or "long".
Method Detail
{string} format(t)
Formats the specified time, returning the string representation.
Parameters:
{number} t
the duration in milliseconds. May also be a Date.
Returns:
{string} the formatted string.

{number} parse(s)
Parses the specified string, returning the time in milliseconds.
Parameters:
{string} s
a formatted string.
Returns:
{number} the parsed duration in milliseconds.

Documentation generated by JsDoc Toolkit 2.3.2 on Fri May 28 2010 10:13:28 GMT-0700 (PDT)