Interface ITime
- Namespace
- ESRI.ArcGIS.esriSystem
- Assembly
- ESRI.Server.System.dll
Provides access to members that control the Time.
[Guid("66810D21-8DE0-44EE-B26E-465AC09F161F")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ITime
Properties
Day
The time's gregorian day.
short Day { get; set; }
Property Value
Hour
The time's hour.
short Hour { get; set; }
Property Value
Minute
The time's minute.
short Minute { get; set; }
Property Value
Month
The time's gregorian month.
short Month { get; set; }
Property Value
Nanoseconds
The time's nanoseconds.
int Nanoseconds { get; set; }
Property Value
Second
The time's second.
short Second { get; set; }
Property Value
Year
The time's gregorian year.
short Year { get; set; }
Property Value
Methods
Compare(ITime)
Compares this time to the other time. Returns -1 if this time's value is less, 1 if greater, and 0 otherwise.
int Compare(ITime otherTime)
Parameters
otherTimeITime
Returns
QueryDayFraction()
The time's time portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.
double QueryDayFraction()
Returns
QueryGregorianTime()
Obtains the time as a gregorian date and time.
WKSDateTime QueryGregorianTime()
Returns
QueryIntegerTime(esriIntegerTimeFormat)
Obtains the time as an integer time.
long QueryIntegerTime(esriIntegerTimeFormat integerTimeFormat)
Parameters
integerTimeFormatesriIntegerTimeFormat
Returns
QueryJulianDayNumber()
The Time's date portion as a julian (Julius Scaliger) day number. Corresponds to the Year, Month, and Day properties.
int QueryJulianDayNumber()
Returns
QueryNanosecondsSinceMidnight()
The time's time portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.
long QueryNanosecondsSinceMidnight()
Returns
QueryOleTime()
Obtains the time as an OLE automation date object.
DateTime QueryOleTime()
Returns
QueryTicks()
Obtains the time as the number of ticks since January 1, 0001 AD (Anno Domini).
long QueryTicks()
Returns
QueryTimeString(esriTimeStringFormat)
Obtains the time as a string, based on the given time string format.
string QueryTimeString(esriTimeStringFormat timeStringFormat)
Parameters
timeStringFormatesriTimeStringFormat
Returns
QueryTimeStringCurrentLocale(esriTimeLocaleFormat)
Obtains the time as a string, based on the current locale.
string QueryTimeStringCurrentLocale(esriTimeLocaleFormat timeLocaleFormat)
Parameters
timeLocaleFormatesriTimeLocaleFormat
Returns
QueryTimeStringCustom(string, int, string, string)
Obtains the time as a string, based on the given custom time string format, and locale properties.
string QueryTimeStringCustom(string timeStringFormat, int LocaleID, string amSymbol, string pmSymbol)
Parameters
Returns
QueryXMLTimeString(ITimeReference)
Obtains the time as an XML time string.
string QueryXMLTimeString(ITimeReference TimeReference)
Parameters
TimeReferenceITimeReference
Returns
SetDayFraction(double)
The time's time portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.
void SetDayFraction(double dayFraction)
Parameters
dayFractiondouble
SetFromCurrentLocalTime()
Writes the time to the current date and time on this machine, expressed as the local time.
void SetFromCurrentLocalTime()
SetFromCurrentUtcTime()
Writes the time to the current date and time on this machine, expressed as the Coordinated Universal Time (UTC).
void SetFromCurrentUtcTime()
SetFromGregorianTime(ref WKSDateTime)
Obtains the time from a given gregorian date and time value.
void SetFromGregorianTime(ref WKSDateTime gregorianTime)
Parameters
gregorianTimeWKSDateTime
SetFromIntegerTime(esriIntegerTimeFormat, long)
Writes the time from an integer time.
void SetFromIntegerTime(esriIntegerTimeFormat integerTimeFormat, long integerTime)
Parameters
integerTimeFormatesriIntegerTimeFormatintegerTimelong
SetFromObject(object)
Writes the time from a variant object.
void SetFromObject(object Object)
Parameters
Objectobject
SetFromOleTime(DateTime)
Writes the time from an OLE automation date object.
void SetFromOleTime(DateTime oleTime)
Parameters
oleTimeDateTime
SetFromTicks(long)
Writes the time from a given number of ticks since January 1, 0001 AD (Anno Domini) value.
void SetFromTicks(long ticks)
Parameters
tickslong
SetFromTimeString(esriTimeStringFormat, string)
Writes the time from a string, based on the given time string format.
void SetFromTimeString(esriTimeStringFormat timeStringFormat, string timeString)
Parameters
timeStringFormatesriTimeStringFormattimeStringstring
SetFromTimeStringCurrentLocale(esriTimeLocaleFormat, string)
Obtains the time from a string, based on the current locale.
void SetFromTimeStringCurrentLocale(esriTimeLocaleFormat timeLocaleFormat, string timeString)
Parameters
timeLocaleFormatesriTimeLocaleFormattimeStringstring
SetFromTimeStringCustom(string, int, string, string, string)
Writes the time from a string, based on the given custom time string formats, and locale properties.
void SetFromTimeStringCustom(string timeStringFormat, int LocaleID, string amSymbol, string pmSymbol, string timeString)
Parameters
SetFromXMLTimeString(string)
Writes the time from an XML time string.
int SetFromXMLTimeString(string xmlTimeString)
Parameters
xmlTimeStringstring
Returns
SetJulianDayNumber(int)
The Time's date portion as a julian (Julius Scaliger) day number. Corresponds to the Year, Month, and Day properties.
void SetJulianDayNumber(int julianDayNumber)
Parameters
julianDayNumberint
SetNanosecondsSinceMidnight(long)
The time's time portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.
void SetNanosecondsSinceMidnight(long nanosecondsSinceMidnight)
Parameters
nanosecondsSinceMidnightlong
SnapToEndOfMonth()
Adjust the day value, to the last day in the current month and year.
void SnapToEndOfMonth()
SubtractTime(ITime)
Subtracts a given time, and returns the time duration result.
ITimeDuration SubtractTime(ITime Time)
Parameters
TimeITime
Returns
ToLocal()
Converts the time from Coordinated Universal Time (UTC) value to local (to this machine) time.
void ToLocal()
ToUTC()
Converts the time from local (to this machine) time value to Coordinated Universal Time (UTC).
void ToUTC()