Type Date

All Supertypes:
OclAny

Predefined type Date
extends OclAny

The Date type represents date values. There is no literal for this type; you should use getCurrent or getDate static operations.


Operation Summary
 Boolean =(Date rhs)
          True if this date corresponds to rhs.
 Boolean >=(Date rhs)
          True if this date is more recent or equivalent to rhs.
 Boolean >(Date rhs)
          True if this date is more recent than rhs.
 Boolean <=(Date rhs)
          True if this date is older or equivalent to rhs.
 Boolean <(Date rhs)
          True if this date is older than rhs.
 Boolean <>(Date rhs)
          True if this date does not correspond to rhs.
 Integer -(Date rhs)
          This is a shorthand for daysFrom.
 Date addDay(Integer days)
          This date adding days days.
 Date addMonth(Integer monthes)
          This date adding monthes monthes.
 Date addYear(Integer years)
          This date adding years years.
 Integer daysFrom(Date rhs)
          The number of days between this date and rhs.
 Date getCurrent
          Static; the current date.
 Date getDate(Integer year, Integer month, Integer day)
          Static; the date with the year year, the month cardinality month and the day in month cardinality day.
 Integer getDay
          The day cardinality (in the month) of this date.
 Integer getMonth
          The month cardinality (in the year) of this date.
 Integer getYear
          The year of this date.
 Date max(Date rhs)
          The most recent date between this date and rhs.
 Date min(Date rhs)
          The oldest date between this date and rhs.
 String toString
          A representative character string of this date.
 
Operations inherited from type OclAny
=, <>, oclAsType, oclIsKindOf, oclIsTypeOf
 

Operations Detail

getCurrent

 public Date getCurrent
Static; the current date.

getDate

 public Date getDate(Integer year, Integer month,
                 Integer day)
Static; the date with the year year, the month cardinality month and the day in month cardinality day. month should be between 1 and 12 and day between 1 and 31. If day is greater than the maximum in the month of the year, the month is incremented (and eventually the year), and the day cardinality will be the difference between day and the maximum of the month. For instance, april 31st, 2000 is equal to may 1st, 2000.

=

 public Boolean =(Date rhs)
True if this date corresponds to rhs.

<>

 public Boolean <>(Date rhs)
True if this date does not correspond to rhs.

-

 public Integer -(Date rhs)
This is a shorthand for daysFrom.

daysFrom

 public Integer daysFrom(Date rhs)
The number of days between this date and rhs. If this date is before rhs, the result will be negative.

addDay

 public Date addDay(Integer days)
This date adding days days. days may be negative.

addMonth

 public Date addMonth(Integer monthes)
This date adding monthes monthes. monthes may be negative.

addYear

 public Date addYear(Integer years)
This date adding years years. years may be negative.

getDay

 public Integer getDay
The day cardinality (in the month) of this date.

getMonth

 public Integer getMonth
The month cardinality (in the year) of this date.

getYear

 public Integer getYear
The year of this date.

max

 public Date max(Date rhs)
The most recent date between this date and rhs.

min

 public Date min(Date rhs)
The oldest date between this date and rhs.

<

 public Boolean <(Date rhs)
True if this date is older than rhs.

>

 public Boolean >(Date rhs)
True if this date is more recent than rhs.

<=

 public Boolean <=(Date rhs)
True if this date is older or equivalent to rhs.

>=

 public Boolean >=(Date rhs)
True if this date is more recent or equivalent to rhs.

toString

 public String toString
A representative character string of this date.


Copyright 1999-2002 ObjeXion Software SA. All rights reserved.