Vision Messages: DateOffset

| Home | DateOffset Class | Message XRef | Messages (General) |

Profile of Class DateOffset


Object
  | 
Ordinal
  | 
  +--- DateOffset
  |      |
  |      +--- BusinessDays
  |      |
  |      +--- Days
  |      |
  |      +--- MonthBeginnings
  |      |
  |      +--- MonthEnds
  |      |
  |      +--- Months
  |      |
  |      +--- QuarterBeginnings
  |      |
  |      +--- QuarterEnds
  |      |
  |      +--- Quarters
  |      |
  |      +--- YearBeginnings
  |      |
  |      +--- YearEnds
  |      |
  |      +--- Years


The class DateOffset is an abstract class that supports the protocol
for the different classes of date increment.  DateOffset are used
primarily in the formation of date ranges and for date arithmetic as
illustrated below:  

     !dr <- 88 to: 85 by: 1 years
     !lastYearEnd <- ^today - 1 yearEnds;

Most of the protocol for is actually implemented at the
specializations of DateOffset.  The actual implementations will
differ among the classes, but the functional goal of a message will
be the same.  


Message Index

o * aValue
o + aValue
o __fixReference
o asDate
o asInteger
o asSelf
o classDescriptor
o defaultInstance
o evaluate: aBlock
o evaluate: aBlock from: aDate to: aDate
o incrementName
o isDateOffset
o print
o subtractedFrom: aDate
o whatAmI


Messages

o *

Synopsis:
DateOffset * aValue

Description:

Multiplies the recipient offset by the value supplied.

Type: Method          Returns: Date

Parameters:

1 - Value

Also Defined At:
| List | TimeSeries | Undefined |

o +

Synopsis:
DateOffset + aValue

Description:

Adds the recipient offset to the value supplied.

Type: Method          Returns: Date

Parameters:

1 - Value

Also Defined At:
| Date | List | TimeSeries | Undefined |

o __fixReference

Synopsis:
DateOffset __fixReference

Type: Method          Returns: Object

Also Defined At:
| Date | Object |

o asDate

Synopsis:
DateOffset asDate

Description:

Adds the recipient offset to the current date (^date).

Type: Method          Returns: Date

Also Defined At:
| Date | Number | String | Undefined |

o asInteger

Synopsis:
DateOffset asInteger

Description:

Converts a DateOffset into an integer in YYYYMMDD form.

Type: Constant          Returns: Integer

Also Defined At:
| Date | String | Undefined |

o asSelf

Synopsis:
DateOffset asSelf

Description:

Returns the original object.

Type: Primitive          Returns: DateOffset

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o classDescriptor

Synopsis:
DateOffset classDescriptor

Description:

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 | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o defaultInstance

Synopsis:
DateOffset defaultInstance

Description:

Returns the default instance of the recipient object's class

Type: Constant          Returns: DateOffset

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o evaluate:

Synopsis:
DateOffset evaluate: aBlock

Description:

Adds the recipient to the current ^date and evaluates the supplied block.
For example:
-3 monthEnds evaluate: [ ^date printNL ] ;

Type: Method          Returns: Object

Parameters:

1 - Block

Also Defined At:
| Currency | Date | DateRange |

o evaluate:from:to:

Synopsis:
DateOffset evaluate: aBlock from: aDate to: aDate

Description:

Evaluates the supplied block for the date range formed by date1, date2, and the recipient DateOffset.

Type: Method          Returns: Object

Parameters:

1 - Block
2 - Date
3 - Date

o incrementName

Synopsis:
DateOffset incrementName

Description:

Returns the name portion of the recipient DateOffset as a String.

Type: Constant          Returns: String

o isDateOffset

Synopsis:
DateOffset isDateOffset

Description:

Returns a TRUE value when sent to any DateOffset.

Type: Constant          Returns: TRUE

Also Defined At:
| Object |

o print

Synopsis:
DateOffset print

Description:

Redefines the standard print message so that the content of the actual date offset is printed.

Type: Method          Returns: DateOffset

Also Defined At:
| Block | Date | DateRange | Entity | IndexedList | List | Object | String | TimeSeries | Undefined |

o subtractedFrom:

Synopsis:
DateOffset subtractedFrom: aDate

Description:

Subtracts the recipient DateOffset from the supplied Date.

Type: Method          Returns: Date

Parameters:

1 - Date

Also Defined At:
| Undefined |

o whatAmI

Synopsis:
DateOffset whatAmI

Description:

Returns the string 'DateOffset'.

Type: Constant          Returns: String

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |