JAVA/CORBA CLASSES


Working with time
Example

The DateTime class represents a date-time. Use createDateTime in Session to create a DateTime object. Various methods throughout the lotus.domino package return DateTime objects.

The following methods access the DateTime properties:


You can change a date-time with the following methods: adjustSecond, adjustMinute, adjustHour, adjustDay, adjustMonth, and adjustYear. You can initialize a date-time or date-time component with the following methods: setNow, setAnyDate, and setAnyTime. You can get the difference in seconds between two times with timeDifference. You can convert a date-time to a java.util.Date object with toJavaDate.

The DateRange class represents a range of dates. The following methods access the DateTime properties:


When you set a DateRange object, write to either StartDate and EndDate, or Text, but not both. Values written to StartDate or EndDate are immediately transcribed to Text, and vice-versa. Any changes made to the DateTime object that is the basis for StartDateTime or EndDateTime also affect the DateRange object.

Example
See Also