Class Year

Description

I am a Timespan that represents a Year.

To create new Year instances, use one of the static instance-creation methods, NOT 'new Year':

    Located in /harmoni/core/Primitives/Chronology/Year.class.php (line 41)

    SObject
       |
       --Magnitude
          |
          --Timespan
             |
             --Year
    Method Summary
    object Year current ([optional $class = 'Year'])
    integer daysInYear ([optional $anInteger = NULL])
    object Year epoch ([optional $class = 'Year'])
    boolean isLeapYear ([optional $anInteger = NULL])
    string printableString ()
    object Year starting (object DateAndTime $aDateAndTime, [optional $class = 'Year'])
    object Year startingDuration (object DateAndTime $aDateAndTime, object Duration $aDuration, [optional $class = 'Year'])
    object Year startingEnding (object DateAndTime $startDateAndTime, object DateAndTime $endDateAndTime, [optional $class = 'Year'])
    object Year withYear (integer $anInteger, [optional $class = 'Year'])
    Variables

    Inherited Variables

    Inherited from Timespan

    Timespan::$duration
    Timespan::$start
    Methods
    asYear (line 276)

    Answer the receiver as a Year

    • since: 5/23/05
    • access: public
    object Year asYear ()

    Redefinition of:
    Timespan::asYear()
    Answer this instance converted.
    current (line 74)

    Answer a new object that represents now.

    • static:
    • since: 5/5/05
    • access: public
    object Year current ([optional $class = 'Year'])
    • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

    Redefinition of:
    Timespan::current()
    Answer a new object that represents now.
    daysInYear (line 231)

    Return the number of days in a year.

    This method can be either called as a class method (with a parameter) or as an instance method (without a parameter).

    • since: 5/4/05
    • access: public
    integer daysInYear ([optional $anInteger = NULL])
    • optional $anInteger: integer $anInteger

    Redefinition of:
    Timespan::daysInYear()
    Answer the number of days in the year represented by the receiver.
    epoch (line 91)

    Answer a Year starting on the Squeak epoch: 1 January 1901

    • static:
    • since: 5/5/05
    • access: public
    object Year epoch ([optional $class = 'Year'])
    • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

    Redefinition of:
    Timespan::epoch()
    Answer a Timespan starting on the Squeak epoch: 1 January 1901
    isLeapYear (line 201)

    Return TRUE if the year passed is a leap year

    This method can be either called as a class method (with a parameter) or as an instance method (without a parameter).

    • static:
    • since: 5/4/05
    • access: public
    boolean isLeapYear ([optional $anInteger = NULL])
    • optional $anInteger: integer $anInteger

    Redefinition of:
    Timespan::isLeapYear()
    Answer TRUE if the year represented by the receiver is a leap year.
    printableString (line 261)

    Answer a printable string

    • since: 5/23/05
    • access: public
    string printableString ()

    Redefinition of:
    Timespan::printableString()
    Return a printable string
    starting (line 109)

    Create a new object starting now

    • static:
    • since: 5/5/05
    • access: public
    object Year starting (object DateAndTime $aDateAndTime, [optional $class = 'Year'])
    • object DateAndTime $aDateAndTime
    • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

    Redefinition of:
    Timespan::starting()
    Create a new object starting now, with zero duration
    startingDuration (line 148)

    Create a new object starting from midnight

    • static:
    • since: 5/5/05
    • access: public
    object Year startingDuration (object DateAndTime $aDateAndTime, object Duration $aDuration, [optional $class = 'Year'])
    • object DateAndTime $aDateAndTime
    • object Duration $aDuration
    • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

    Redefinition of:
    Timespan::startingDuration()
    Create a new object
    startingEnding (line 127)

    Create a new object with given start and end DateAndTimes

    • since: 5/11/05
    • access: public
    object Year startingEnding (object DateAndTime $startDateAndTime, object DateAndTime $endDateAndTime, [optional $class = 'Year'])
    • object DateAndTime $startDateAndTime
    • object DateAndTime $endDateAndTime
    • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

    Redefinition of:
    Timespan::startingEnding()
    Create a new object with given start and end DateAndTimes
    withYear (line 179)

    Create a new Year

    • static:
    • since: 5/4/05
    • access: public
    object Year withYear (integer $anInteger, [optional $class = 'Year'])
    • integer $anInteger
    • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

    Inherited Methods

    Inherited From Timespan

    Timespan::Timespan()
    Timespan::asDate()
    Timespan::asDateAndTime()
    Timespan::asDuration()
    Timespan::asMonth()
    Timespan::asTime()
    Timespan::asTimeStamp()
    Timespan::asWeek()
    Timespan::asYear()
    Timespan::current()
    Timespan::dates()
    Timespan::day()
    Timespan::dayOfMonth()
    Timespan::dayOfWeek()
    Timespan::dayOfWeekName()
    Timespan::dayOfYear()
    Timespan::daysInMonth()
    Timespan::daysInYear()
    Timespan::daysLeftInYear()
    Timespan::duration()
    Timespan::end()
    Timespan::epoch()
    Timespan::every()
    Timespan::firstDayOfMonth()
    Timespan::includes()
    Timespan::includesAllOf()
    Timespan::includesAnyOf()
    Timespan::intersection()
    Timespan::isEqualTo()
    Timespan::isLeapYear()
    Timespan::isLessThan()
    Timespan::julianDayNumber()
    Timespan::minus()
    Timespan::months()
    Timespan::next()
    Timespan::plus()
    Timespan::previous()
    Timespan::printableString()
    Timespan::setDuration()
    Timespan::setStart()
    Timespan::start()
    Timespan::starting()
    Timespan::startingDuration()
    Timespan::startingEnding()
    Timespan::startMonth()
    Timespan::startMonthAbbreviation()
    Timespan::startMonthIndex()
    Timespan::startMonthName()
    Timespan::startYear()
    Timespan::to()
    Timespan::union()
    Timespan::weeks()
    Timespan::years()

    Inherited From Magnitude

    Magnitude::isBetween()
    Magnitude::isEqualTo()
    Magnitude::isGreaterThan()
    Magnitude::isGreaterThanOrEqualTo()
    Magnitude::isLessThan()
    Magnitude::isLessThanOrEqualTo()
    Magnitude::max()
    Magnitude::min()

    Inherited From SObject

    SObject::asA()
    SObject::asString()
    SObject::copy()
    SObject::copySameFrom()
    SObject::copyTwoLevel()
    SObject::deepCopy()
    SObject::isEqual()
    SObject::isEqualTo()
    SObject::isNotEqualTo()
    SObject::isNotReferenceTo()
    SObject::isReferenceTo()
    SObject::newFrom()
    SObject::postCopy()
    SObject::printableString()
    SObject::shallowCopy()
    SObject::_deepCopyArray()

    Documentation generated on Wed, 19 Sep 2007 10:28:51 -0400 by phpDocumentor 1.3.0RC3