Class MochiKit.DateTime.TimePeriod
The time period class. Used to encapsulate a structured
time period, split up into its variuos components. For time
period calculations, the total millisecond value is normally
a better choice (to avoid overflow and underflow issues).
Defined in: DateTime.js.
Constructor Attributes | Constructor Name and Description |
---|---|
MochiKit.DateTime.TimePeriod(millis)
Creates a new time period object from a number of milliseconds.
|
Field Attributes | Field Name and Description |
---|---|
The number of days in the period.
|
|
The number of hours in the period.
|
|
The number of remaining milliseconds in
the period.
|
|
The number of minutes in the period.
|
|
The number of seconds in the period.
|
Class Detail
MochiKit.DateTime.TimePeriod(millis)
Creates a new time period object from a number of milliseconds.
- Parameters:
- {Number} millis
- the number of milliseconds in the period
- Returns:
- {Object} new time period object
Field Detail
{Number}
days
The number of days in the period. This is
an integer value from 0 and up.
{Number}
hours
The number of hours in the period. This
is an integer value between 0 and 23.
{Number}
millis
The number of remaining milliseconds in
the period. This is an integer value between 0 and 999.
{Number}
minutes
The number of minutes in the period.
This is an integer value between 0 and 59.
{Number}
seconds
The number of seconds in the period.
This is an integer value between 0 and 59.