Do not use this constructor for building objects, please use the class-methods Timespan::new(), Timespan::starting(), etcetera, instead.
Answer this instance converted.
obect
asDate
()
Redefined in descendants as:
Answer this instance converted.
obect
asDateAndTime
()
Answer this instance converted.
obect
asDuration
()
Answer this instance converted.
obect
asMonth
()
Redefined in descendants as:
Answer this instance converted.
obect
asTime
()
Answer this instance converted.
obect
asTimeStamp
()
Answer this instance converted.
obect
asWeek
()
Redefined in descendants as:
Answer this instance converted.
obect
asYear
()
Redefined in descendants as:
Answer a new object that represents now.
-
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.
Redefined in descendants as:
Return an array of the dates in the reciever.
array
dates
()
Answer the day
integer
day
()
Answer the day of the month represented by the receiver.
integer
dayOfMonth
()
Answer the day of the week represented by the receiver.
integer
dayOfWeek
()
Answer the day of the week represented by the receiver.
integer
dayOfWeekName
()
Answer the day of the year represented by the receiver.
integer
dayOfYear
()
Answer the number of days in the month represented by the receiver.
ingteger
daysInMonth
()
Redefined in descendants as:
Answer the number of days in the year represented by the receiver.
ingteger
daysInYear
()
Redefined in descendants as:
Answer the number of days in the year after the date of the receiver.
ingteger
daysLeftInYear
()
Answer the Duration of this timespan
Answer the end of this timespan
Answer a Timespan starting on the Squeak epoch: 1 January 1901
-
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.
Redefined in descendants as:
-
Date::epoch()
: Answer a Date starting on the Squeak epoch: 1 January 1901
-
Month::epoch()
: Answer a Month starting on the Squeak epoch: 1 January 1901
-
Schedule::epoch()
: Answer a Month starting on the Squeak epoch: 1 January 1901
-
Week::epoch()
: Answer a Month starting on the Squeak epoch: 1 January 1901
-
Year::epoch()
: Answer a Year starting on the Squeak epoch: 1 January 1901
Return an array of the DateAndTimes that occur every $aDuration in the reciever.
array
every
(mixed $aDuration)
Answer the day-in-the-year of the first day of our month
integer
firstDayOfMonth
()
Answer TRUE if the argument is within the timespan covered by the reciever.
Answer whether all the elements of anArray are in the receiver.
boolean
includesAllOf
(array $anArray)
-
array
$anArray: An array of Timespans or DateAndTimes.
Answer whether any the elements of anArray are in the receiver.
boolean
includesAnyOf
(array $anArray)
-
array
$anArray: An array of Timespans or DateAndTimes.
Return the Timespan both have in common, or null
Test if this Timespan is equal to a Timespan.
Redefinition of:
- Magnitude::isEqualTo()
- Test if this is equal to aMagnitude.
Answer TRUE if the year represented by the receiver is a leap year.
integer
isLeapYear
()
Redefined in descendants as:
Test if this Timespan is less than a comparand.
boolean
isLessThan
(object $aComparand)
Redefinition of:
- Magnitude::isLessThan()
- Test if this is less than aMagnitude.
Answer the Julian day number represented by the reciever.
integer
julianDayNumber
()
Subtract a Duration or DateAndTime.
Return an array of the Months in the reciever.
array
months
()
Answer the next object of our duration.
Answer the previous object of our duration.
Redefined in descendants as:
Return a printable string
string
printableString
()
Redefinition of:
- SObject::printableString()
- Answer a String whose characters are a description of the receiver.
Redefined in descendants as:
Set the Duration of this timespan
Store the start DateAndTime of this timespan
Answer the start DateAndTime of this timespan
Create a new object starting now, with zero duration
-
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.
Redefined in descendants as:
Create a new object
-
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.
Redefined in descendants as:
Create a new object with given start and end DateAndTimes
-
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.
Redefined in descendants as:
Answer the month represented by the receiver.
integer
startMonth
()
Answer the month represented by the receiver.
integer
startMonthAbbreviation
()
Answer the month represented by the receiver.
integer
startMonthIndex
()
Answer the month represented by the receiver.
integer
startMonthName
()
Answer the year represented by the receiver.
integer
startYear
()
Answer an Timespan. anEnd must be aDateAndTime or a Timespan
-
object
$anEnd: Must be a DateAndTime or a Timespan
Return the Timespan spanned by both
Return an array of the weeks in the reciever.
array
weeks
()
Return an array of the years in the reciever.
array
years
()
Inherited Methods
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()