|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITime
Provides access to members that control the Time.
The ITime interface is used to access a scalar time value. There is no associated temporal reference, so there is no time zone or daylight savings time associated with the value. The ITime interface can be used to do simple conversions, such as setting a year, month and day, then getting querying for a Julian Day number. The ITime interface supports values with nanosecond accuracy. In general, setting individual values such as the year, month, and day can be problematic. for example, if the Month is set to 2 (February) when the day already has the value 31, this will cause an error because there is no February 31st. It would be better to set the month and day at the same time.
Method Summary | |
---|---|
int |
compare(ITime otherTime)
Compares this time to the other time. |
short |
getDay()
The time's gregorian day. |
short |
getHour()
The time's hour. |
short |
getMinute()
The time's minute. |
short |
getMonth()
The time's gregorian month. |
int |
getNanoseconds()
The time's nanoseconds. |
short |
getSecond()
The time's second. |
short |
getYear()
The time's gregorian year. |
double |
queryDayFraction()
The time's time portion as a day fraction. |
_WKSDateTime |
queryGregorianTime()
Obtains the time as a gregorian date and time. |
long |
queryIntegerTime(int integerTimeFormat)
Obtains the time as an integer time. |
int |
queryJulianDayNumber()
The Time's date portion as a julian (Julius Scaliger) day number. |
long |
queryNanosecondsSinceMidnight()
The time's time portion as the number of nanoseconds elapsed since midnight. |
Date |
queryOleTime()
Obtains the time as an OLE automation date object. |
long |
queryTicks()
Obtains the time as the number of ticks since January 1, 0001 AD (Anno Domini). |
String |
queryTimeString(int timeStringFormat)
Obtains the time as a string, based on the given time string format. |
String |
queryTimeStringCurrentLocale(int timeLocaleFormat)
Obtains the time as a string, based on the current locale. |
String |
queryTimeStringCustom(String timeStringFormat,
int localeID,
String amSymbol,
String pmSymbol)
Obtains the time as a string, based on the given custom time string format, and locale properties. |
String |
queryXMLTimeString(ITimeReference timeReference)
Obtains the time as an XML time string. |
void |
setDay(short day)
The time's gregorian day. |
void |
setDayFraction(double dayFraction)
The time's time portion as a day fraction. |
void |
setFromCurrentLocalTime()
Writes the time to the current date and time on this machine, expressed as the local time. |
void |
setFromCurrentUtcTime()
Writes the time to the current date and time on this machine, expressed as the Coordinated Universal Time (UTC). |
void |
setFromGregorianTime(_WKSDateTime gregorianTime)
Obtains the time from a given gregorian date and time value. |
void |
setFromIntegerTime(int integerTimeFormat,
long integerTime)
Writes the time from an integer time. |
void |
setFromObject(Object object)
Writes the time from a variant object. |
void |
setFromOleTime(Date oleTime)
Writes the time from an OLE automation date object. |
void |
setFromTicks(long ticks)
Writes the time from a given number of ticks since January 1, 0001 AD (Anno Domini) value. |
void |
setFromTimeString(int timeStringFormat,
String timeString)
Writes the time from a string, based on the given time string format. |
void |
setFromTimeStringCurrentLocale(int timeLocaleFormat,
String timeString)
Obtains the time from a string, based on the current locale. |
void |
setFromTimeStringCustom(String timeStringFormat,
int localeID,
String amSymbol,
String pmSymbol,
String timeString)
Writes the time from a string, based on the given custom time string formats, and locale properties. |
int |
setFromXMLTimeString(String xmlTimeString)
Writes the time from an XML time string. |
void |
setHour(short hour)
The time's hour. |
void |
setJulianDayNumber(int julianDayNumber)
The Time's date portion as a julian (Julius Scaliger) day number. |
void |
setMinute(short minute)
The time's minute. |
void |
setMonth(short month)
The time's gregorian month. |
void |
setNanoseconds(int nanoseconds)
The time's nanoseconds. |
void |
setNanosecondsSinceMidnight(long nanosecondsSinceMidnight)
The time's time portion as the number of nanoseconds elapsed since midnight. |
void |
setSecond(short second)
The time's second. |
void |
setYear(short year)
The time's gregorian year. |
void |
snapToEndOfMonth()
Adjust the day value, to the last day in the current month and year. |
ITimeDuration |
subtractTime(ITime time)
Subtracts a given time, and returns the time duration result. |
void |
toLocal()
Converts the time from Coordinated Universal Time (UTC) value to local (to this machine) time. |
void |
toUTC()
Converts the time from local (to this machine) time value to Coordinated Universal Time (UTC). |
Method Detail |
---|
short getYear() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setYear(short year) throws IOException, AutomationException
year
- The year (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.short getMonth() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setMonth(short month) throws IOException, AutomationException
month
- The month (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.short getDay() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setDay(short day) throws IOException, AutomationException
day
- The day (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.short getHour() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setHour(short hour) throws IOException, AutomationException
hour
- The hour (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.short getMinute() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setMinute(short minute) throws IOException, AutomationException
minute
- The minute (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.short getSecond() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSecond(short second) throws IOException, AutomationException
second
- The second (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getNanoseconds() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setNanoseconds(int nanoseconds) throws IOException, AutomationException
nanoseconds
- The nanoseconds (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int queryJulianDayNumber() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setJulianDayNumber(int julianDayNumber) throws IOException, AutomationException
julianDayNumber
- The julianDayNumber (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double queryDayFraction() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setDayFraction(double dayFraction) throws IOException, AutomationException
dayFraction
- The dayFraction (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.long queryNanosecondsSinceMidnight() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setNanosecondsSinceMidnight(long nanosecondsSinceMidnight) throws IOException, AutomationException
nanosecondsSinceMidnight
- Signed 64-bit int (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ITimeDuration subtractTime(ITime time) throws IOException, AutomationException
This function subtracts the passed time value from the current time, and returns the difference in the TimeDuration parameter. If the passed time value is before the current time value, then the result will be positive. If the passed time value is after the current time value, then the result will be negative.
time
- A reference to a com.esri.arcgis.system.ITime (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void snapToEndOfMonth() throws IOException, AutomationException
SnapToEndOfMonth changes the current date of the Time object, but not the hours, minutes, or seconds. It changes the date to the last day of the month. If the current month is February, then the resulting date will depend on if the current year is a leap year.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void toUTC() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void toLocal() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String queryTimeString(int timeStringFormat) throws IOException, AutomationException
timeStringFormat
- A com.esri.arcgis.system.esriTimeStringFormat constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFromTimeString(int timeStringFormat, String timeString) throws IOException, AutomationException
timeStringFormat
- A com.esri.arcgis.system.esriTimeStringFormat constant (in)timeString
- The timeString (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String queryTimeStringCurrentLocale(int timeLocaleFormat) throws IOException, AutomationException
timeLocaleFormat
- A com.esri.arcgis.system.esriTimeLocaleFormat constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFromTimeStringCurrentLocale(int timeLocaleFormat, String timeString) throws IOException, AutomationException
timeLocaleFormat
- A com.esri.arcgis.system.esriTimeLocaleFormat constant (in)timeString
- The timeString (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String queryTimeStringCustom(String timeStringFormat, int localeID, String amSymbol, String pmSymbol) throws IOException, AutomationException
This function will provide a time/date string in a format specified by the time format string, date format string, and using the AM/PM designators. The time format string uses the following symbols:
h = hour (12 hour clock)
H = hour (24 hour clock)
m = minute
s = second
t = am/pm designator
hh,mm,ss indicate that there is a leading zero for values less than 10
h,m,s indicate that there is no leading zero
Note that the am/pm designator should not be present when the time is measured using a 24-hour clock
the AM/PM designators will only be used if the time string contains the "t" value
The date format string uses the following symbols:
M = month of the year
d = day of the month
y = year
MM and dd indicate that there is a leading zero when the month/day is less than 10
M and d indicate that there is no leading zero
yy indicates a 2 digit year
yyyy indicates a 4 digit year
timeStringFormat
- The timeStringFormat (in)localeID
- The localeID (in)amSymbol
- The amSymbol (in)pmSymbol
- The pmSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFromTimeStringCustom(String timeStringFormat, int localeID, String amSymbol, String pmSymbol, String timeString) throws IOException, AutomationException
The passed time string is assumed to be in a format specified by the time format string, date format string, and using the AM/PM designators. The time format string uses the following symbols:
h = hour (12 hour clock)
H = hour (24 hour clock)
m = minute
s = second
t = am/pm designator
hh,mm,ss indicate that there is a leading zero for values less than 10
h,m,s indicate that there is no leading zero
Note that the am/pm designator should not be present when the time is measured using a 24-hour clock
the AM/PM designators will only be used if the time string contains the "t" value
The date format string uses the following symbols:
M = month of the year
d = day of the month
y = year
MM and dd indicate that there is a leading zero when the month/day is less than 10
M and d indicate that there is no leading zero
yy indicates a 2 digit year
yyyy indicates a 4 digit year
timeStringFormat
- The timeStringFormat (in)localeID
- The localeID (in)amSymbol
- The amSymbol (in)pmSymbol
- The pmSymbol (in)timeString
- The timeString (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String queryXMLTimeString(ITimeReference timeReference) throws IOException, AutomationException
timeReference
- A reference to a com.esri.arcgis.system.ITimeReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int setFromXMLTimeString(String xmlTimeString) throws IOException, AutomationException
xmlTimeString
- The xmlTimeString (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.long queryIntegerTime(int integerTimeFormat) throws IOException, AutomationException
integerTimeFormat
- A com.esri.arcgis.system.esriIntegerTimeFormat constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFromIntegerTime(int integerTimeFormat, long integerTime) throws IOException, AutomationException
integerTimeFormat
- A com.esri.arcgis.system.esriIntegerTimeFormat constant (in)integerTime
- Signed 64-bit int (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFromObject(Object object) throws IOException, AutomationException
object
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.Date queryOleTime() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFromOleTime(Date oleTime) throws IOException, AutomationException
oleTime
- The oleTime (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception._WKSDateTime queryGregorianTime() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFromGregorianTime(_WKSDateTime gregorianTime) throws IOException, AutomationException
gregorianTime
- A Structure: com.esri.arcgis.system._WKSDateTime (A com.esri.arcgis.system._WKSDateTime COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.long queryTicks() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFromTicks(long ticks) throws IOException, AutomationException
ticks
- Signed 64-bit int (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFromCurrentLocalTime() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFromCurrentUtcTime() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int compare(ITime otherTime) throws IOException, AutomationException
otherTime
- A reference to a com.esri.arcgis.system.ITime (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |