Period Object

Functions for representing and treating periods of time.

Static Methods

    days(count: Number) -> Object

    Create a period of a number of days.

    hours(count: Number) -> Object

    Create a period of a number of hours.

    minutes(count: Number) -> Object

    Create a period of a number of minutes.

    seconds(count: Number) -> Object

    Create a period of a number of seconds.

    isPeriod(x: Any) -> Boolean

    Test whether a given value is a period object.

    hasElapsed(period: Object, when: Date) -> Boolean

    Test whether a given period has elapsed.

    Parameters (2)

    period
    Object
    when
    Date

    The current time as far as the test goes

    toMilliseconds(period: Object) -> Number

    Convert a period object to the number of milliseconds it represents.