org.eigenbase.util14
Interface BasicDatetime

All Known Implementing Classes:
ZonelessDate, ZonelessDatetime, ZonelessTime, ZonelessTimestamp

public interface BasicDatetime

BasicDatetime is an interface for dates, times, or timestamps that can be assigned from a long value. The value to be assigned may either be a zoneless time, or it may be a zoned time.

A zoneless time is based on milliseconds. It may contain date and/or time components as follows:

 The time component = value % milliseconds in a day
 The date component = value / milliseconds in a day
 
If a date component is specified, it is relative to the epoch (1970-01-01).

A zoned time represents a time that was created in a particular time zone. It may contain date and/or time components that are valid when interpreted relative to a specified time zone, according to a Calendar. Jdbc types, such as Date typically contain zoned times.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/util14/BasicDatetime.java#5 $
Author:
John Pham

Method Summary
 long getTime()
          Gets the internal value of this datetime
 void setZonedTime(long value, TimeZone zone)
          Sets this datetime via a zoned time value.
 void setZonelessTime(long value)
          Sets this datetime via a zoneless time value.
 

Method Detail

getTime

long getTime()
Gets the internal value of this datetime


setZonelessTime

void setZonelessTime(long value)
Sets this datetime via a zoneless time value. See class comments for more information.


setZonedTime

void setZonedTime(long value,
                  TimeZone zone)
Sets this datetime via a zoned time value. See class comments for more information.