Vision Messages: Date
Profile of Class Date
Includes Classes: Date, Ordinal
Object | Ordinal | +--- Date
The instances of the class Date represent a specific day in the calendar. Each date encompasses a day, month, and year. Dates are formed in one of two ways. Explicit dates can be derived by sending the asDate message to integers in one of the forms illustrated below: Integer Form Example Returns Date ----------------------------------------------------------------- YYYYMMDD 19850923 asDate 9/23/1985 YYMMDD 861015 asDate 10/15/1986 YYMM 8803 asDate 3/31/1988 YY 87 asDate 12/31/1987 Dates can also be formed relative to another date by adding or subtracting a date offset to or from the date. For example: 88 asDate - 5 days ==> 12/26/1988 87 asDate + 1 monthEnds ==> 1/31/1988
Message Index
!= aDate
+ aDateOffset
- aDateOffset
< aNumber (Ordinal)
< aDate (Date)
<= aNumber (Ordinal)
<= aDate (Date)
= aDate
> aNumber (Ordinal)
> aDate (Date)
>= aNumber (Ordinal)
>= aDate (Date)
DayOfWeekDescriptor
MonthDescriptor
__fixReference
asBDay
asBDayMonday
asCurrentYearMMDD
asDate
asIDate7
asInteger
asMonthEnd
asMostRecentBusinessMonthEnd
asMostRecentMonthEnd
asQuarterEnd
asSelf (Ordinal)
asSelf (Date)
asYearBeginning
asYearEnd
between: anOrdinal1 and: anOrdinal2
by: aDateOffset from: aDate evaluate: aBlock
by: aDateOffset to: aDate evaluate: aBlock
classDescriptor (Ordinal)
classDescriptor (Date)
convertFrom: string
count30DayDaysTo: aDate
count360DayYearsTo: aDate
count6monthIntervalsTo: aDate
countBDaysTo: aDate
countDaysTo: aDate
countFullMonthsTo: aDate
countIntervalsOf: aDateOffset to: aDate
countMonthsTo: aDate
countYearsTo: aDate
day
dayNumberOfWeek
dayOfWeek
defaultInstance (Ordinal)
defaultInstance (Date)
evaluate: aBlock
extract: block for: object
formatUsingLongName
formatUsingMMDD
formatUsingMMDDYY
formatUsingMMDDYYYY
formatUsingShortName
getDayOfWeekDescriptor
getMonthDescriptor
Ordinal inRange: aList
inSet: aList
inputExpression
isDate
isDefault
isInitialDate
isLastBusinessDayOfMonth
isMonthEnd
isOrdinal
isValid
isntValid
max: aNumber
min: aNumber
month
new
notBetween: anOrdinal1 and: anOrdinal2
print
print: anInteger
quarterNumber
to: aDate by: aDateOffset
whatAmI (Ordinal)
whatAmI (Date)
year
Messages
Synopsis:+Date != aDateDescription:
Tests if recipient date is the same as the supplied date.Type: Method          Returns: Boolean
Parameters:
1 - Date
Synopsis:-Date + aDateOffsetDescription:
Adds the supplied date increment to the recipient date.Type: Method          Returns: Date
Parameters:
1 - DateOffset
Also Defined At:
| DateOffset | List | TimeSeries | Undefined |
Synopsis:<Date - aDateOffsetDescription:
Subtracts the supplied date increment from the recipient dateType: Method          Returns: Date
Parameters:
1 - DateOffset
Also Defined At:
| List | TimeSeries | Undefined |
Synopsis:<Ordinal < aNumberDescription:
Tests if recipient is smaller than supplied value. Each subclass of Ordinal must redefine this message. If a subclass does not implement <, then an attempt to send the message to a subclass results in an error message of the form: >>> '<' must be implemented for 'recipient' <<<.Type: Method          Returns: Boolean
Parameters:
1 - Number
Synopsis:<=Date < aDateDescription:
Tests if recipient date comes before supplied date.Type: Method          Returns: Boolean
Parameters:
1 - Date
Synopsis:<=Ordinal <= aNumberDescription:
Tests if recipient is smaller than or equal to supplied value.Type: Method          Returns: Boolean
Parameters:
1 - Number
Synopsis:=Date <= aDateDescription:
Tests if recipient date is the same or earlier than supplied date.Type: Method          Returns: Boolean
Parameters:
1 - Date
Synopsis:>Date = aDateDescription:
Tests if recipient date is the same as the supplied date.Type: Method          Returns: Boolean
Parameters:
1 - Date
Synopsis:>Ordinal > aNumberDescription:
Tests if recipient is larger than supplied value.Type: Method          Returns: Boolean
Parameters:
1 - Number
Also Defined At:
| Date | Number | Object | String | Undefined |
Synopsis:>=Date > aDateDescription:
Tests if recipient date is later than supplied date.Type: Method          Returns: Boolean
Parameters:
1 - Date
Synopsis:>=Ordinal >= aNumberDescription:
Tests if recipient is larger than or equal to supplied value.Type: Method          Returns: Boolean
Parameters:
1 - Number
Also Defined At:
| Date | Number | Object | String | Undefined |
Synopsis:DayOfWeekDescriptorDate >= aDateDescription:
Tests if recipient date is the same or earlier than supplied date.Type: Method          Returns: Boolean
Parameters:
1 - Date
Synopsis:MonthDescriptorDate DayOfWeekDescriptorDescription:
Returns default 'Date DayOfWeekDescriptor' objectType: Constant          Returns: Date DayOfWeekDescriptor
Synopsis:__fixReferenceDate MonthDescriptorDescription:
Returns default 'Date MonthDescriptor' objectType: Constant          Returns: Date MonthDescriptor
Synopsis:asBDayDate __fixReferenceType: Method          Returns: Object
Also Defined At:
| DateOffset | Object |
Synopsis:asBDayMondayDate asBDayDescription:
Converts the recipient date to a business day (Monday - Friday). If the recipient date is a Monday through Friday date, that date is returned. If the recipient date is a Saturday or Sunday date, the previous Friday's date is returned.Type: Method          Returns: Date
Synopsis:asCurrentYearMMDDDate asBDayMondayDescription:
Converts the recipient date to a business day (Monday - Friday). If the recipient date is a Monday through Friday date, that date is returned. If the recipient date is a Saturday or Sunday date, the following Monday's date is returned.Type: Method          Returns: Date
Synopsis:asDateDate asCurrentYearMMDDDescription:
Converts recipient date to same date in current year.Type: Method          Returns: Date
Synopsis:asIDate7Date asDateDescription:
Returns recipient stripped of any extensions.Type: Primitive          Returns: Date
Also Defined At:
| DateOffset | Number | String | Undefined |
Synopsis:asIntegerDate asIDate7Description:
Converts recipient into an integer representing the number of days since January 1, 0001. Useful for computing the number of days between two dates.Type: Primitive          Returns: Integer
Synopsis:asMonthEndDate asIntegerDescription:
Converts a date into an integer in YYYYMMDD form.Type: Primitive          Returns: Integer
Also Defined At:
| DateOffset | String | Undefined |
Synopsis:asMostRecentBusinessMonthEndDate asMonthEndDescription:
Returns the month-end date for the Date represented by the recipient.Type: Method          Returns: Date
Synopsis:asMostRecentMonthEndDate asMostRecentBusinessMonthEndDescription:
Returns the last business day in the month on or before the recipient date.Type: Method          Returns: Date
Synopsis:asQuarterEndDate asMostRecentMonthEndDescription:
Returns the last month-end date relative to the recipient date. If recipient is not a month-end date, the previous month-end date is returned. If recipient is a month-end date, it is returned.Type: Method          Returns: Date
Synopsis:asSelfDate asQuarterEndDescription:
Returns the quarter-end date for the Date represented by the recipient.Type: Method          Returns: Date
Synopsis:asSelfOrdinal asSelfDescription:
Returns the original object.Type: Primitive          Returns: Ordinal
Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |
Synopsis:asYearBeginningDate asSelfDescription:
Returns the original object.Type: Primitive          Returns: Date
Also Defined At:
| Block | Boolean | Classification | Collection | Currency | DateOffset | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |
Synopsis:asYearEndDate asYearBeginningDescription:
Returns the year-beginning date for the Date represented by the recipient.Type: Method          Returns: Date
Synopsis:between:and:Date asYearEndDescription:
Returns the year-end date for the Date represented by the recipient.Type: Method          Returns: Date
Synopsis:by:from:evaluate:Ordinal between: anOrdinal1 and: anOrdinal2Description:
Tests if recipient Ordinal is between supplied Ordinal1 and supplied Ordinal2Type: Method          Returns: Boolean
Parameters:
1 - String
2 - String
Also Defined At:
| Undefined |
Synopsis:by:to:evaluate:Date by: aDateOffset from: aDate evaluate: aBlockDescription:
Evaluates supplied Block for recipient Date by supplied increment from supplied DateType: Method          Returns: Object
Parameters:
1 - DateOffset
2 - Date
3 - Block
Synopsis:classDescriptorDate by: aDateOffset to: aDate evaluate: aBlockDescription:
Evaluates supplied Block for recipient Date by supplied increment to supplied Date.Type: Method          Returns: Object
Parameters:
1 - DateOffset
2 - Date
3 - Block
Synopsis:classDescriptorOrdinal classDescriptorDescription:
Reference to the object which describes the class. Class level information is stored here.Type: Constant          Returns: Object
Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |
Synopsis:convertFrom:Date classDescriptorDescription:
Reference to the object which describes the class. Class level information is stored here.Type: Constant          Returns: Object
Also Defined At:
| Block | Boolean | Classification | Collection | Currency | DateOffset | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |
Synopsis:count30DayDaysTo:Date convertFrom: stringDescription:
This message converts the supplied string to an instance of the recipient's class if applicable, returning NA otherwise. The definition at Object will lookup the string in the class' naming dictionary, if defined. The version at String returns the recipient stripped of any extensions. The versions at Number, Integer, Double, and Float convert the recipient to a numeric value if possible. The version at Date converts the recipient to a Date using the 'asDate' message defined at String. The version at Boolean returns TRUE if the recipient contains an upper/lower case combination of 'true' and FALSE if the recipient contains an upper/lower case combination of 'false'. The version at block returns a block containing the string as a message. This message is called by the 'as:' message at String.Type: Method          Returns: Object
Also Defined At:
| Block | Boolean | Number | Object | String | Undefined |
Synopsis:count360DayYearsTo:Date count30DayDaysTo: aDateDescription:
Counts the number of days between original date and date supplied, assuming all months have 30 days. Assumes original date is earlier than date supplied. Used primarily in yield-to-maturity type applications.Type: Method          Returns: Number
Parameters:
1 - Date
Synopsis:count6monthIntervalsTo:Date count360DayYearsTo: aDateDescription:
Counts the number of years between original date and date supplied, assuming all months have 30 days (all years have 360 days). Assumes original date is earlier than date supplied. Used primarily in yield-to-maturity type applications.Type: Method          Returns: Number
Parameters:
1 - Date
Synopsis:countBDaysTo:Date count6monthIntervalsTo: aDateDescription:
Counts the number of 6 month intervals between two dates. Assumes original date is earlier than supplied date. Used primarily in bond applications - interpreted as number of full coupon payments remaining. Assumes end point is at a six month interval.Type: Method          Returns: Number
Parameters:
1 - Date
Synopsis:countDaysTo:Date countBDaysTo: aDateDescription:
Counts the number of business days between recipient date and date supplied.Type: Method          Returns: Number
Parameters:
1 - Date
Synopsis:countFullMonthsTo:Date countDaysTo: aDateDescription:
Counts the number of days between recipient date and date supplied.Type: Method          Returns: Number
Parameters:
1 - Date
Synopsis:countIntervalsOf:to:Date countFullMonthsTo: aDateDescription:
Computes number of FULL months between two dates.Type: Method          Returns: Number
Parameters:
1 - Date
Synopsis:countMonthsTo:Date countIntervalsOf: aDateOffset to: aDateDescription:
Counts the number of full intervals between recipient date and date suppliedType: Method          Returns: Number
Parameters:
1 - DateOffset
2 - Date
Synopsis:countYearsTo:Date countMonthsTo: aDateDescription:
Computes number of months between two dates.Type: Method          Returns: Number
Parameters:
1 - Date
Synopsis:dayDate countYearsTo: aDateDescription:
Computes the number of years (full and fractional) between two dates. A full year is assumed to have 365.25 days.Type: Method          Returns: Number
Parameters:
1 - Date
Synopsis:dayNumberOfWeekDate dayDescription:
Returns the 'day' portion of recipient date.Type: Primitive          Returns: Integer
Synopsis:dayOfWeekDate dayNumberOfWeekDescription:
Returns a number (1 - 7) indicating recipient's day of week. 1 is Monday; 7 is Sunday.Type: Method          Returns: Integer
Synopsis:defaultInstanceDate dayOfWeekDescription:
Returns day of week as a string (e.g. Monday).Type: Method          Returns: String
Synopsis:defaultInstanceOrdinal defaultInstanceDescription:
Returns the default instance of the recipient object's classType: Constant          Returns: Ordinal
Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | OpenVision | Schema | String | TimeSeries | Undefined | Utility |
Synopsis:evaluate:Date defaultInstanceDescription:
Returns the default instance of the recipient object's classType: Constant          Returns: Date
Also Defined At:
| Block | Boolean | Classification | Collection | Currency | DateOffset | Dictionary | Entity | IndexedList | Interface | List | Number | OpenVision | Schema | String | TimeSeries | Undefined | Utility |
Synopsis:extract:for:Date evaluate: aBlockDescription:
Evaluates all statements in the block as of recipient date. The recipient date becomes the default inside the block (changing the value of the magic word ^date). The default date would otherwise be the current date (accessible by the magic word ^today).Type: Primitive          Returns: Date
Parameters:
1 - Block
Also Defined At:
| Currency | DateOffset |
Synopsis:formatUsingLongNameDate extract: block for: objectDescription:
This message evaluates the supplied block for the supplied object and returns the value as of the recipient date.Type: Method          Returns: Object
Parameters:
1 - Block
2 - Object
Synopsis:formatUsingMMDDDate formatUsingLongNameDescription:
Returns date as string in the form March 31, 1991.Type: Method          Returns: String
Synopsis:formatUsingMMDDYYDate formatUsingMMDDDescription:
Returns date as string in the form 3/31.Type: Method          Returns: String
Synopsis:formatUsingMMDDYYYYDate formatUsingMMDDYYDescription:
Returns date as string in the form 3/31/91.Type: Method          Returns: String
Synopsis:formatUsingShortNameDate formatUsingMMDDYYYYDescription:
Returns date as string in the form 3/31/1991Type: Method          Returns: String
Synopsis:getDayOfWeekDescriptorDate formatUsingShortNameDescription:
Returns date as string in the form 31-Mar-1991.Type: Method          Returns: String
Synopsis:getMonthDescriptorDate getDayOfWeekDescriptorDescription:
Returns DayOfWeekDescriptor for current date.Type: Method          Returns: Date DayOfWeekDescriptor
Synopsis:inRange:Date getMonthDescriptorDescription:
Returns MonthDescriptor for current date.Type: Method          Returns: Date MonthDescriptor
Synopsis:inSet:Ordinal Ordinal inRange: aListDescription:
Tests if recipient Ordinal is in range specified by aList, where aList contains 2 elements - the start and end of the range (inclusive).Type: Method          Returns: Boolean
Parameters:
1 - String
Synopsis:inputExpressionOrdinal inSet: aListDescription:
Tests if recipient Ordinal is included in supplied list.Type: Method          Returns: Boolean
Parameters:
1 - String
Synopsis:isDateDate inputExpressionDescription:
Used by DDMS ToolKit to format recipient as input.Type: Method          Returns: Object
Synopsis:isDefaultDate isDateDescription:
Returns a TRUE value when sent to any date.Type: Constant          Returns: TRUE
Also Defined At:
| Object |
Synopsis:isInitialDateDate isDefaultDescription:
Returns TRUE if date is earliest possible date.Type: Method          Returns: Boolean
Also Defined At:
| Collection | Object | String | Undefined |
Synopsis:isLastBusinessDayOfMonthDate isInitialDateDescription:
Returns TRUE if date is earliest possible date, otherwise returns FALSE.Type: Method          Returns: Boolean
Synopsis:isMonthEndDate isLastBusinessDayOfMonthDescription:
Determines if recipient date is the last business day of the month.Type: Method          Returns: Boolean
Synopsis:isOrdinalDate isMonthEndDescription:
Determines whether recipient date is the last day of the month.Type: Method          Returns: Boolean
Synopsis:isValidOrdinal isOrdinalDescription:
Returns a TRUE value when sent to any Ordinal.Type: Constant          Returns: TRUE
Also Defined At:
| Object |
Synopsis:isntValidDate isValidDescription:
Returns TRUE if recipient date is greater than or equal to earliest possible date (January 1, 0001).Type: Method          Returns: Boolean
Synopsis:max:Date isntValidDescription:
Returns TRUE if recipient date less than earliest possible date (January 1, 0001).Type: Method          Returns: Boolean
Synopsis:min:Ordinal max: aNumberDescription:
Computes the larger of the supplied value and the recipient Number. If an invalid parameter is supplied, NA is returned.Type: Method          Returns: Number
Parameters:
1 - Number
Also Defined At:
| Collection | Undefined |
Synopsis:monthOrdinal min: aNumberDescription:
Computes the smaller of the supplied value and the recipient Number. If an invalid parameter is supplied, NA is returned.Type: Method          Returns: Number
Parameters:
1 - Number
Also Defined At:
| Collection | Undefined |
Synopsis:newDate monthDescription:
Returns the 'month' portion of recipient date.Type: Primitive          Returns: Integer
Synopsis:notBetween:and:Ordinal newDescription:
Undefines the 'new' message for Ordinal classes.Type: Method          Returns: Ordinal
Also Defined At:
| Boolean | Collection | DateRange | Dictionary | Object | Undefined |
Synopsis:printOrdinal notBetween: anOrdinal1 and: anOrdinal2Description:
Tests if recipient Ordinal is not between supplied Ordinal1 and supplied Ordinal2.Type: Method          Returns: Boolean
Parameters:
1 - String
2 - String
Also Defined At:
| Undefined |
Synopsis:print:Date printDescription:
Redefines the standard print message so that the value of the recipient date is printed.Type: Primitive          Returns: Date
Also Defined At:
| Block | DateOffset | Entity | IndexedList | List | Object | String | TimeSeries | Undefined |
Synopsis:quarterNumberDate print: anIntegerDescription:
Prints the recipient date using the supplied format. If the width is less than 8 characters, the format is mm/yy padded with spaces at the right. If the width is 8 characters, the format is mm/dd/yy. If the width is 9 characters, the format is mm/dd/yy_. Otherwise, the format is mm/dd/yyyy padded with spaces at the right.Type: Method          Returns: Date
Parameters:
1 - Integer
Also Defined At:
| Boolean | Entity | Number | Object | String | Undefined |
Synopsis:to:by:Date quarterNumberDescription:
Returns the quarter (1-4) of the recipient date.Type: Method          Returns: Integer
Synopsis:whatAmIDate to: aDate by: aDateOffsetDescription:
Produces a Date Range from two Dates and a Date Increment supplied. Dates can be in ascending or descending order.Type: Method          Returns: DateRange
Parameters:
1 - Date
2 - DateOffset
Synopsis:whatAmIOrdinal whatAmIDescription:
Returns the string 'Ordinal'.Type: Constant          Returns: String
Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |
Synopsis:yearDate whatAmIDescription:
Returns the string 'Date'.Type: Constant          Returns: String
Also Defined At:
| Block | Boolean | Classification | Collection | Currency | DateOffset | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |
Synopsis:Date yearDescription:
Retuns the 'year' portion of recipient date.Type: Primitive          Returns: Integer