Class TimeStamp

Description

This represents a duration of 0 length that marks a particular point in time.

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

    Located in /harmoni/core/Primitives/Chronology/TimeStamp.class.php (line 68)

    SObject
       |
       --Magnitude
          |
          --DateAndTime
             |
             --TimeStamp
    Method Summary
    integer asUnixTimeStamp ()
    object TimeStamp current ([optional $class = 'TimeStamp'])
    array dateAndTimeArray ()
    object TimeStamp epoch ([optional $class = 'TimeStamp'])
    object TimeStamp fromString (string $aString, [optional $class = 'TimeStamp'])
    object Timestamp fromUnixTimeStamp (integer $aUnixTimeStamp, [optional $class = 'TimeStamp'])
    object TimeStamp midnight ([optional $class = 'TimeStamp'])
    object TimeStamp minusDays (integer $anInteger)
    object TimeStamp minusSeconds (integer $anInteger)
    object TimeStamp noon ([optional $class = 'TimeStamp'])
    object TimeStamp now ([optional $class = 'TimeStamp'])
    object TimeStamp plusDays (integer $anInteger)
    object TimeStamp plusSeconds (integer $anInteger)
    string printableString ()
    object TimeStamp today ([optional $class = 'TimeStamp'])
    object TimeStamp tomorrow ([optional $class = 'TimeStamp'])
    object TimeStamp withDateAndTime (optional $aDate, mixed $aTime, [mixed $class = 'TimeStamp'])
    object TimeStamp withJulianDayNumber (integer $aJulianDayNumber, [optional $class = 'TimeStamp'])
    void withYearDay (integer $anIntYear, integer $anIntDayOfYear, [optional $class = 'TimeStamp'])
    object TimeStamp withYearDayHourMinuteSecond (integer $anIntYear, integer $anIntDayOfYear, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, [optional $class = 'TimeStamp'])
    object TimeStamp withYearDayHourMinuteSecondOffset (integer $anIntYear, integer $anIntDayOfYear, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, object Duration $aDurationOffset, [optional $class = 'TimeStamp'])
    object TimeStamp withYearMonthDay (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, [optional $class = 'Timestamp'])
    object TimeStamp withYearMonthDayHourMinute (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, integer $anIntHour, integer $anIntMinute, [optional $class = 'TimeStamp'])
    object TimeStamp withYearMonthDayHourMinuteSecond (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, [optional $class = 'TimeStamp'])
    object TimeStamp withYearMonthDayHourMinuteSecondOffset (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, object Duration $aDurationOffset, [optional $class = 'TimeStamp'])
    object TimeStamp yesterday ([optional $class = 'TimeStamp'])
    Variables
    Methods
    asTimeStamp (line 504)

    Answer a Timestamp that represents this DateAndTime

    • since: 5/5/05
    • access: public
    object TimeStamp asTimeStamp ()

    Redefinition of:
    DateAndTime::asTimeStamp()
    Answer a Timestamp that represents this DateAndTime
    asUnixTimeStamp (line 516)

    Answer the reciever as a UNIX timestamp - The number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT/UTC).

    • since: 5/27/05
    • access: public
    integer asUnixTimeStamp ()
    current (line 94)

    Answer a TimeStamp representing now

    • since: 5/13/05
    • access: public
    object TimeStamp current ([optional $class = 'TimeStamp'])
    • 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.
    date (line 530)

    Answer the date of the receiver.

    • since: 5/13/05
    • access: public
    object Date date ()
    dateAndTimeArray (line 542)

    Answer a two element Array containing the receiver's date and time.

    • since: 5/13/05
    • access: public
    array dateAndTimeArray ()
    epoch (line 111)

    Answer a TimeStamp representing the Squeak epoch: 1 January 1901

    • static:
    • since: 5/2/05
    • access: public
    object TimeStamp epoch ([optional $class = 'TimeStamp'])
    • 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:
    DateAndTime::epoch()
    Answer a new instance representing the Squeak epoch: 1 January 1901
    fromString (line 139)

    Answer a new instance represented by a string:

    • '-1199-01-05T20:33:14.321-05:00'
    • ' 2002-05-16T17:20:45.00000001+01:01'
    • ' 2002-05-16T17:20:45.00000001'
    • ' 2002-05-16T17:20'
    • ' 2002-05-16T17:20:45'
    • ' 2002-05-16T17:20:45+01:57'
    • ' 2002-05-16T17:20:45-02:34'
    • ' 2002-05-16T17:20:45+00:00'
    • ' 1997-04-26T01:02:03+01:02:3'

    • static:
    • since: 5/12/05
    • access: public
    object TimeStamp fromString (string $aString, [optional $class = 'TimeStamp'])
    • string $aString: The input string.
    • 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:
    DateAndTime::fromString()
    Answer a new instance represented by a string:
    fromUnixTimeStamp (line 157)

    Create a new TimeStamp from a UNIX timestamp.

    • since: 5/27/05
    • access: public
    object Timestamp fromUnixTimeStamp (integer $aUnixTimeStamp, [optional $class = 'TimeStamp'])
    • integer $aUnixTimeStamp: The number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT/UTC)
    • 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.
    midnight (line 177)

    Answer a new instance starting at midnight local time.

    • static:
    • since: 5/3/05
    • access: public
    object TimeStamp midnight ([optional $class = 'TimeStamp'])
    • 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:
    DateAndTime::midnight()
    Answer a new instance starting at midnight local time.
    minusDays (line 557)

    Answer a TimeStamp which is anInteger days before the receiver.

    • since: 5/13/05
    • access: public
    object TimeStamp minusDays (integer $anInteger)
    • integer $anInteger
    minusSeconds (line 570)

    Answer a TimeStamp which is anInteger seconds before the receiver.

    • since: 5/13/05
    • access: public
    object TimeStamp minusSeconds (integer $anInteger)
    • integer $anInteger
    noon (line 211)

    Answer a new instance starting at noon local time.

    • static:
    • since: 5/3/05
    • access: public
    object TimeStamp noon ([optional $class = 'TimeStamp'])
    • 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:
    DateAndTime::noon()
    Answer a new instance starting at noon local time.
    now (line 194)

    Answer the current time.

    • static:
    • since: 5/12/05
    • access: public
    object TimeStamp now ([optional $class = 'TimeStamp'])
    • 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:
    DateAndTime::now()
    Answer the current date and time.
    plusDays (line 583)

    Answer a TimeStamp which is anInteger days after the receiver.

    • since: 5/13/05
    • access: public
    object TimeStamp plusDays (integer $anInteger)
    • integer $anInteger
    plusSeconds (line 596)

    Answer a TimeStamp which is anInteger seconds after the receiver.

    • since: 5/13/05
    • access: public
    object TimeStamp plusSeconds (integer $anInteger)
    • integer $anInteger
    printableString (line 487)

    Print receiver's date and time

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

    Redefinition of:
    DateAndTime::printableString()
    Print as per ISO 8601 sections 5.3.3 and 5.4.1.
    time (line 608)

    Answer the time of the receiver.

    • since: 5/13/05
    • access: public
    object Time time ()
    today (line 228)

    Answer a new instance representing today

    • static:
    • since: 5/12/05
    • access: public
    object TimeStamp today ([optional $class = 'TimeStamp'])
    • 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:
    DateAndTime::today()
    Answer a new instance representing today
    tomorrow (line 245)

    Answer a new instance representing tomorow

    • static:
    • since: 5/12/05
    • access: public
    object TimeStamp tomorrow ([optional $class = 'TimeStamp'])
    • 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:
    DateAndTime::tomorrow()
    Answer a new instance representing tomorow
    withDateAndTime (line 262)

    Create a new instance from Date and Time objects

    • static:
    • since: 5/12/05
    • access: public
    object TimeStamp withDateAndTime (optional $aDate, mixed $aTime, [mixed $class = 'TimeStamp'])
    • optional $aDate: 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:
    DateAndTime::withDateAndTime()
    Create a new instance from Date and Time objects
    withJulianDayNumber (line 280)

    Create a new instance for a given Julian Day Number.

    • static:
    • since: 5/2/05
    • access: public
    object TimeStamp withJulianDayNumber (integer $aJulianDayNumber, [optional $class = 'TimeStamp'])
    • integer $aJulianDayNumber
    • 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:
    DateAndTime::withJulianDayNumber()
    Create a new new instance for a given Julian Day Number.
    withYearDay (line 298)

    Create a new instance.

    • since: 5/4/05
    • static:
    • access: public
    void withYearDay (integer $anIntYear, integer $anIntDayOfYear, [optional $class = 'TimeStamp'])
    • integer $anIntYear
    • integer $anIntDayOfYear
    • 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:
    DateAndTime::withYearDay()
    Create a new instance.
    withYearDayHourMinuteSecond (line 320)

    Create a new instance.

    • since: 5/4/05
    • static:
    • access: public
    object TimeStamp withYearDayHourMinuteSecond (integer $anIntYear, integer $anIntDayOfYear, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, [optional $class = 'TimeStamp'])
    • integer $anIntYear
    • integer $anIntDayOfYear
    • integer $anIntHour
    • integer $anIntMinute
    • integer $anIntSecond
    • 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:
    DateAndTime::withYearDayHourMinuteSecond()
    Create a new instance.
    withYearDayHourMinuteSecondOffset (line 346)

    Create a new instance.

    • since: 5/4/05
    • static:
    • access: public
    object TimeStamp withYearDayHourMinuteSecondOffset (integer $anIntYear, integer $anIntDayOfYear, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, object Duration $aDurationOffset, [optional $class = 'TimeStamp'])
    • integer $anIntYear
    • integer $anIntDayOfYear
    • integer $anIntHour
    • integer $anIntMinute
    • integer $anIntSecond
    • object Duration $aDurationOffset
    • 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:
    DateAndTime::withYearDayHourMinuteSecondOffset()
    Create a new instance.
    withYearMonthDay (line 369)

    Create a new instance.

    • since: 5/4/05
    • static:
    • access: public
    object TimeStamp withYearMonthDay (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, [optional $class = 'Timestamp'])
    • integer $anIntYear
    • integer $anIntOrStringMonth
    • integer $anIntDay
    • 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:
    DateAndTime::withYearMonthDay()
    Create a new instance.
    withYearMonthDayHourMinute (line 394)

    Create a new instance.

    • since: 5/4/05
    • static:
    • access: public
    object TimeStamp withYearMonthDayHourMinute (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, integer $anIntHour, integer $anIntMinute, [optional $class = 'TimeStamp'])
    • integer $anIntYear
    • integer $anIntOrStringMonth
    • integer $anIntDay
    • integer $anIntHour
    • integer $anIntMinute
    • 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:
    DateAndTime::withYearMonthDayHourMinute()
    Create a new instance.
    withYearMonthDayHourMinuteSecond (line 421)

    Create a new instance.

    • since: 5/4/05
    • static:
    • access: public
    object TimeStamp withYearMonthDayHourMinuteSecond (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, [optional $class = 'TimeStamp'])
    • integer $anIntYear
    • integer $anIntOrStringMonth
    • integer $anIntDay
    • integer $anIntHour
    • integer $anIntMinute
    • integer $anIntSecond
    • 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:
    DateAndTime::withYearMonthDayHourMinuteSecond()
    Create a new instance.
    withYearMonthDayHourMinuteSecondOffset (line 448)

    Create a new instance.

    • since: 5/4/05
    • static:
    • access: public
    object TimeStamp withYearMonthDayHourMinuteSecondOffset (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, object Duration $aDurationOffset, [optional $class = 'TimeStamp'])
    • integer $anIntYear
    • integer $anIntOrStringMonth
    • integer $anIntDay
    • integer $anIntHour
    • integer $anIntMinute
    • integer $anIntSecond
    • object Duration $aDurationOffset
    • 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:
    DateAndTime::withYearMonthDayHourMinuteSecondOffset()
    Create a new instance.
    yesterday (line 471)

    Answer a new instance representing yesterday

    • static:
    • since: 5/12/05
    • access: public
    object TimeStamp yesterday ([optional $class = 'TimeStamp'])
    • 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:
    DateAndTime::yesterday()
    Answer a new instance representing yesterday

    Inherited Methods

    Inherited From DateAndTime

    DateAndTime::asDate()
    DateAndTime::asDateAndTime()
    DateAndTime::asDuration()
    DateAndTime::asLocal()
    DateAndTime::asMonth()
    DateAndTime::asSeconds()
    DateAndTime::asTime()
    DateAndTime::asTimeStamp()
    DateAndTime::asUTC()
    DateAndTime::asWeek()
    DateAndTime::asYear()
    DateAndTime::atMidnight()
    DateAndTime::atNoon()
    DateAndTime::clockPrecision()
    DateAndTime::day()
    DateAndTime::dayMonthYearArray()
    DateAndTime::dayOfMonth()
    DateAndTime::dayOfWeek()
    DateAndTime::dayOfWeekAbbreviation()
    DateAndTime::dayOfWeekName()
    DateAndTime::dayOfYear()
    DateAndTime::daysInMonth()
    DateAndTime::daysInYear()
    DateAndTime::daysLeftInYear()
    DateAndTime::duration()
    DateAndTime::epoch()
    DateAndTime::firstDayOfMonth()
    DateAndTime::fromString()
    DateAndTime::hmsString()
    DateAndTime::hour()
    DateAndTime::hour12()
    DateAndTime::hour24()
    DateAndTime::isEqualTo()
    DateAndTime::isLeapYear()
    DateAndTime::isLessThan()
    DateAndTime::julianDayNumber()
    DateAndTime::localOffset()
    DateAndTime::localTimeZone()
    DateAndTime::mdyString()
    DateAndTime::meridianAbbreviation()
    DateAndTime::middleOf()
    DateAndTime::midnight()
    DateAndTime::minus()
    DateAndTime::minute()
    DateAndTime::month()
    DateAndTime::monthAbbreviation()
    DateAndTime::monthIndex()
    DateAndTime::monthName()
    DateAndTime::noon()
    DateAndTime::now()
    DateAndTime::offset()
    DateAndTime::plus()
    DateAndTime::printableString()
    DateAndTime::second()
    DateAndTime::ticks()
    DateAndTime::ticksOffset()
    DateAndTime::timeZone()
    DateAndTime::timeZoneAbbreviation()
    DateAndTime::timeZoneName()
    DateAndTime::to()
    DateAndTime::toBy()
    DateAndTime::today()
    DateAndTime::tomorrow()
    DateAndTime::utcOffset()
    DateAndTime::withDateAndTime()
    DateAndTime::withJulianDayNumber()
    DateAndTime::withOffset()
    DateAndTime::withYearDay()
    DateAndTime::withYearDayHourMinuteSecond()
    DateAndTime::withYearDayHourMinuteSecondOffset()
    DateAndTime::withYearMonthDay()
    DateAndTime::withYearMonthDayHourMinute()
    DateAndTime::withYearMonthDayHourMinuteSecond()
    DateAndTime::withYearMonthDayHourMinuteSecondOffset()
    DateAndTime::year()
    DateAndTime::yesterday()
    DateAndTime::ymdString()
    DateAndTime::_normalize()

    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:27:28 -0400 by phpDocumentor 1.3.0RC3