Class TimeClass

Namespace
ESRI.ArcGIS.esriSystem
Assembly
ESRI.Server.System.dll
[Guid("E1721810-8210-45B1-8590-FC4C911FBA20")]
[ClassInterface(ClassInterfaceType.None)]
public class TimeClass : Time, ITime2, ITime, ITimeOffsetOperator, IXMLSerialize, IXMLVersionSupport, IClone, IPersistStream, IPersist, IDocumentVersionSupportGEN
Inheritance
TimeClass
Implements
Inherited Members

Constructors

TimeClass()

public TimeClass()

Explicit Interface Implementations

AddDays(double)

Adds the input amount of days.

virtual void AddDays(double Value)

Parameters

Value double

AddDuration(ITimeDuration)

Adds a time duration.

virtual void AddDuration(ITimeDuration TimeDuration)

Parameters

TimeDuration ITimeDuration

AddHours(double)

Adds the input amount of hours.

virtual void AddHours(double Value)

Parameters

Value double

AddMilliseconds(double)

Adds the input amount of milliseconds.

virtual void AddMilliseconds(double Value)

Parameters

Value double

AddMinutes(double)

Adds the input amount of minutes.

virtual void AddMinutes(double Value)

Parameters

Value double

AddMonths(double, bool, bool)

Adds the input amount of months.

virtual bool AddMonths(double Value, bool preserveEndOfMonth, bool goForwardOnInvalidDate)

Parameters

Value double
preserveEndOfMonth bool
goForwardOnInvalidDate bool

Returns

bool

AddNanoseconds(long)

Adds the input amount of nanoseconds.

virtual void AddNanoseconds(long Value)

Parameters

Value long

AddSeconds(double)

Adds the input amount of seconds.

virtual void AddSeconds(double Value)

Parameters

Value double

AddWeeks(double)

Adds the input amount of weeks.

virtual void AddWeeks(double Value)

Parameters

Value double

AddYears(double, bool, bool)

Adds the input amount of years.

virtual bool AddYears(double Value, bool preserveEndOfMonth, bool goForwardOnInvalidDate)

Parameters

Value double
preserveEndOfMonth bool
goForwardOnInvalidDate bool

Returns

bool

Assign(IClone)

Assigns the properties of src to the receiver.

virtual void Assign(IClone src)

Parameters

src IClone

Clone()

Clones the receiver and assigns the result to *clone.

virtual IClone Clone()

Returns

IClone

Compare(ITime)

Compares this time to the other time. Returns -1 if this time's value is less, 1 if greater, and 0 otherwise.

virtual int Compare(ITime otherTime)

Parameters

otherTime ITime

Returns

int

ConvertToSupportedObject(esriArcGISVersion)

Convert the object to another object that is supported.

virtual object ConvertToSupportedObject(esriArcGISVersion docVersion)

Parameters

docVersion esriArcGISVersion

Returns

object

Remarks

This method should be used when IDocumentVersionSupportGEN::IsSupportedAtVersion returns FALSE.  Calling ConvertToSupportedObject will return an IUnknown pointer to a relevant object supported at the particular ArcGIS version.  Not all objects will return a supported object; in these cases a null pointer will be returned.

Day

The time's gregorian day.

virtual short Day { get; set; }

Returns

short

DayOfWeek

The day number of the week, starting with 1 for Sunday.

virtual short DayOfWeek { get; }

Returns

short

DayOfYear

The day number of the year, starting with 1 for the first day of the year.

virtual short DayOfYear { get; }

Returns

short

Deserialize(IXMLSerializeData)

Deserializes an object from XML.

virtual void Deserialize(IXMLSerializeData data)

Parameters

data IXMLSerializeData

GetClassID(out Guid)

virtual void GetClassID(out Guid pClassID)

Parameters

pClassID Guid

GetSizeMax(out _ULARGE_INTEGER)

virtual void GetSizeMax(out _ULARGE_INTEGER pcbSize)

Parameters

pcbSize _ULARGE_INTEGER

Hour

The time's hour.

virtual short Hour { get; set; }

Returns

short

ITime2_Compare(ITime)

virtual int ITime2_Compare(ITime otherTime)

Parameters

otherTime ITime

Returns

int

ITime2_Day

virtual short ITime2_Day { get; set; }

Returns

short

ITime2_Hour

virtual short ITime2_Hour { get; set; }

Returns

short

ITime2_Minute

virtual short ITime2_Minute { get; set; }

Returns

short

ITime2_Month

virtual short ITime2_Month { get; set; }

Returns

short

ITime2_Nanoseconds

virtual int ITime2_Nanoseconds { get; set; }

Returns

int

ITime2_QueryDayFraction()

virtual double ITime2_QueryDayFraction()

Returns

double

ITime2_QueryGregorianTime()

virtual WKSDateTime ITime2_QueryGregorianTime()

Returns

WKSDateTime

ITime2_QueryIntegerTime(esriIntegerTimeFormat)

virtual long ITime2_QueryIntegerTime(esriIntegerTimeFormat integerTimeFormat)

Parameters

integerTimeFormat esriIntegerTimeFormat

Returns

long

ITime2_QueryJulianDayNumber()

virtual int ITime2_QueryJulianDayNumber()

Returns

int

ITime2_QueryNanosecondsSinceMidnight()

virtual long ITime2_QueryNanosecondsSinceMidnight()

Returns

long

ITime2_QueryOleTime()

virtual DateTime ITime2_QueryOleTime()

Returns

DateTime

ITime2_QueryTicks()

virtual long ITime2_QueryTicks()

Returns

long

ITime2_QueryTimeString(esriTimeStringFormat)

virtual string ITime2_QueryTimeString(esriTimeStringFormat timeStringFormat)

Parameters

timeStringFormat esriTimeStringFormat

Returns

string

ITime2_QueryTimeStringCurrentLocale(esriTimeLocaleFormat)

virtual string ITime2_QueryTimeStringCurrentLocale(esriTimeLocaleFormat timeLocaleFormat)

Parameters

timeLocaleFormat esriTimeLocaleFormat

Returns

string

ITime2_QueryTimeStringCustom(string, int, string, string)

virtual string ITime2_QueryTimeStringCustom(string timeStringFormat, int LocaleID, string amSymbol, string pmSymbol)

Parameters

timeStringFormat string
LocaleID int
amSymbol string
pmSymbol string

Returns

string

ITime2_QueryXMLTimeString(ITimeReference)

virtual string ITime2_QueryXMLTimeString(ITimeReference TimeReference)

Parameters

TimeReference ITimeReference

Returns

string

ITime2_Second

virtual short ITime2_Second { get; set; }

Returns

short

ITime2_SetDayFraction(double)

virtual void ITime2_SetDayFraction(double dayFraction)

Parameters

dayFraction double

ITime2_SetFromCurrentLocalTime()

virtual void ITime2_SetFromCurrentLocalTime()

ITime2_SetFromCurrentUtcTime()

virtual void ITime2_SetFromCurrentUtcTime()

ITime2_SetFromGregorianTime(ref WKSDateTime)

virtual void ITime2_SetFromGregorianTime(ref WKSDateTime gregorianTime)

Parameters

gregorianTime WKSDateTime

ITime2_SetFromIntegerTime(esriIntegerTimeFormat, long)

virtual void ITime2_SetFromIntegerTime(esriIntegerTimeFormat integerTimeFormat, long integerTime)

Parameters

integerTimeFormat esriIntegerTimeFormat
integerTime long

ITime2_SetFromObject(object)

virtual void ITime2_SetFromObject(object Object)

Parameters

Object object

ITime2_SetFromOleTime(DateTime)

virtual void ITime2_SetFromOleTime(DateTime oleTime)

Parameters

oleTime DateTime

ITime2_SetFromTicks(long)

virtual void ITime2_SetFromTicks(long ticks)

Parameters

ticks long

ITime2_SetFromTimeString(esriTimeStringFormat, string)

virtual void ITime2_SetFromTimeString(esriTimeStringFormat timeStringFormat, string timeString)

Parameters

timeStringFormat esriTimeStringFormat
timeString string

ITime2_SetFromTimeStringCurrentLocale(esriTimeLocaleFormat, string)

virtual void ITime2_SetFromTimeStringCurrentLocale(esriTimeLocaleFormat timeLocaleFormat, string timeString)

Parameters

timeLocaleFormat esriTimeLocaleFormat
timeString string

ITime2_SetFromTimeStringCustom(string, int, string, string, string)

virtual void ITime2_SetFromTimeStringCustom(string timeStringFormat, int LocaleID, string amSymbol, string pmSymbol, string timeString)

Parameters

timeStringFormat string
LocaleID int
amSymbol string
pmSymbol string
timeString string

ITime2_SetFromXMLTimeString(string)

virtual int ITime2_SetFromXMLTimeString(string xmlTimeString)

Parameters

xmlTimeString string

Returns

int

ITime2_SetJulianDayNumber(int)

virtual void ITime2_SetJulianDayNumber(int julianDayNumber)

Parameters

julianDayNumber int

ITime2_SetNanosecondsSinceMidnight(long)

virtual void ITime2_SetNanosecondsSinceMidnight(long nanosecondsSinceMidnight)

Parameters

nanosecondsSinceMidnight long

ITime2_SnapToEndOfMonth()

virtual void ITime2_SnapToEndOfMonth()

ITime2_SubtractTime(ITime)

virtual ITimeDuration ITime2_SubtractTime(ITime Time)

Parameters

Time ITime

Returns

ITimeDuration

ITime2_ToLocal()

virtual void ITime2_ToLocal()

ITime2_ToUTC()

virtual void ITime2_ToUTC()

ITime2_Year

virtual short ITime2_Year { get; set; }

Returns

short

IsDirty()

virtual void IsDirty()

IsEqual(IClone)

Indicates if the receiver and other have the same properties.

virtual bool IsEqual(IClone other)

Parameters

other IClone

Returns

bool

IsIdentical(IClone)

Indicates if the receiver and other are the same object.

virtual bool IsIdentical(IClone other)

Parameters

other IClone

Returns

bool

IsSupportedAtVersion(esriArcGISVersion)

Is this object valid at the given document version.

virtual bool IsSupportedAtVersion(esriArcGISVersion docVersion)

Parameters

docVersion esriArcGISVersion

Returns

bool

Remarks

Use IsSupportedAtVersion to identify if a particular object should be saved to the ObjectStream.  This result is based on the esriArcGISVersion enumeration.  In some instances, if the object is not supported at a particular ArcGIS version, the object may support conversion to another similar object; use IDocumentVersionSupportGEN::ConvertToSupportedObject to accomplish this.

Load(IStream)

virtual void Load(IStream pstm)

Parameters

pstm IStream

MinNamespaceSupported

The minimum namespace the class can serialize to (eg the 90 namespace).

virtual string MinNamespaceSupported { get; }

Returns

string

Minute

The time's minute.

virtual short Minute { get; set; }

Returns

short

Month

The time's gregorian month.

virtual short Month { get; set; }

Returns

short

Nanoseconds

The time's nanoseconds.

virtual int Nanoseconds { get; set; }

Returns

int

QueryDayFraction()

The time's time portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.

virtual double QueryDayFraction()

Returns

double

QueryGregorianTime()

Obtains the time as a gregorian date and time.

virtual WKSDateTime QueryGregorianTime()

Returns

WKSDateTime

QueryIntegerTime(esriIntegerTimeFormat)

Obtains the time as an integer time.

virtual long QueryIntegerTime(esriIntegerTimeFormat integerTimeFormat)

Parameters

integerTimeFormat esriIntegerTimeFormat

Returns

long

QueryJulianDayNumber()

The Time's date portion as a julian (Julius Scaliger) day number. Corresponds to the Year, Month, and Day properties.

virtual int QueryJulianDayNumber()

Returns

int

QueryNanosecondsSinceMidnight()

The time's time portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.

virtual long QueryNanosecondsSinceMidnight()

Returns

long

QueryOleTime()

Obtains the time as an OLE automation date object.

virtual DateTime QueryOleTime()

Returns

DateTime

QueryTicks()

Obtains the time as the number of ticks since January 1, 0001 AD (Anno Domini).

virtual long QueryTicks()

Returns

long

QueryTimeString(esriTimeStringFormat)

Obtains the time as a string, based on the given time string format.

virtual string QueryTimeString(esriTimeStringFormat timeStringFormat)

Parameters

timeStringFormat esriTimeStringFormat

Returns

string

QueryTimeStringCurrentLocale(esriTimeLocaleFormat)

Obtains the time as a string, based on the current locale.

virtual string QueryTimeStringCurrentLocale(esriTimeLocaleFormat timeLocaleFormat)

Parameters

timeLocaleFormat esriTimeLocaleFormat

Returns

string

QueryTimeStringCustom(string, int, string, string)

Obtains the time as a string, based on the given custom time string format, and locale properties.

virtual string QueryTimeStringCustom(string timeStringFormat, int LocaleID, string amSymbol, string pmSymbol)

Parameters

timeStringFormat string
LocaleID int
amSymbol string
pmSymbol string

Returns

string

QueryXMLTimeString(ITimeReference)

Obtains the time as an XML time string.

virtual string QueryXMLTimeString(ITimeReference TimeReference)

Parameters

TimeReference ITimeReference

Returns

string

Save(IStream, int)

virtual void Save(IStream pstm, int fClearDirty)

Parameters

pstm IStream
fClearDirty int

Second

The time's second.

virtual short Second { get; set; }

Returns

short

Serialize(IXMLSerializeData)

Serializes an object to XML.

virtual void Serialize(IXMLSerializeData data)

Parameters

data IXMLSerializeData

SetDayFraction(double)

The time's time portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.

virtual void SetDayFraction(double dayFraction)

Parameters

dayFraction double

SetFromCurrentLocalTime()

Writes the time to the current date and time on this machine, expressed as the local time.

virtual void SetFromCurrentLocalTime()

SetFromCurrentUtcTime()

Writes the time to the current date and time on this machine, expressed as the Coordinated Universal Time (UTC).

virtual void SetFromCurrentUtcTime()

SetFromGregorianTime(ref WKSDateTime)

Obtains the time from a given gregorian date and time value.

virtual void SetFromGregorianTime(ref WKSDateTime gregorianTime)

Parameters

gregorianTime WKSDateTime

SetFromIntegerTime(esriIntegerTimeFormat, long)

Writes the time from an integer time.

virtual void SetFromIntegerTime(esriIntegerTimeFormat integerTimeFormat, long integerTime)

Parameters

integerTimeFormat esriIntegerTimeFormat
integerTime long

SetFromObject(object)

Writes the time from a variant object.

virtual void SetFromObject(object Object)

Parameters

Object object

SetFromOleTime(DateTime)

Writes the time from an OLE automation date object.

virtual void SetFromOleTime(DateTime oleTime)

Parameters

oleTime DateTime

SetFromTicks(long)

Writes the time from a given number of ticks since January 1, 0001 AD (Anno Domini) value.

virtual void SetFromTicks(long ticks)

Parameters

ticks long

SetFromTimeString(esriTimeStringFormat, string)

Writes the time from a string, based on the given time string format.

virtual void SetFromTimeString(esriTimeStringFormat timeStringFormat, string timeString)

Parameters

timeStringFormat esriTimeStringFormat
timeString string

SetFromTimeStringCurrentLocale(esriTimeLocaleFormat, string)

Obtains the time from a string, based on the current locale.

virtual void SetFromTimeStringCurrentLocale(esriTimeLocaleFormat timeLocaleFormat, string timeString)

Parameters

timeLocaleFormat esriTimeLocaleFormat
timeString string

SetFromTimeStringCustom(string, int, string, string, string)

Writes the time from a string, based on the given custom time string formats, and locale properties.

virtual void SetFromTimeStringCustom(string timeStringFormat, int LocaleID, string amSymbol, string pmSymbol, string timeString)

Parameters

timeStringFormat string
LocaleID int
amSymbol string
pmSymbol string
timeString string

SetFromXMLTimeString(string)

Writes the time from an XML time string.

virtual int SetFromXMLTimeString(string xmlTimeString)

Parameters

xmlTimeString string

Returns

int

SetJulianDayNumber(int)

The Time's date portion as a julian (Julius Scaliger) day number. Corresponds to the Year, Month, and Day properties.

virtual void SetJulianDayNumber(int julianDayNumber)

Parameters

julianDayNumber int

SetNanosecondsSinceMidnight(long)

The time's time portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.

virtual void SetNanosecondsSinceMidnight(long nanosecondsSinceMidnight)

Parameters

nanosecondsSinceMidnight long

SnapToEndOfMonth()

Adjust the day value, to the last day in the current month and year.

virtual void SnapToEndOfMonth()

SubtractDuration(ITimeDuration)

Subtracts a time duration.

virtual void SubtractDuration(ITimeDuration TimeDuration)

Parameters

TimeDuration ITimeDuration

SubtractTime(ITime)

Subtracts a given time, and returns the time duration result.

virtual ITimeDuration SubtractTime(ITime Time)

Parameters

Time ITime

Returns

ITimeDuration

ToLocal()

Converts the time from Coordinated Universal Time (UTC) value to local (to this machine) time.

virtual void ToLocal()

ToUTC()

Converts the time from local (to this machine) time value to Coordinated Universal Time (UTC).

virtual void ToUTC()

WeekOfMonth[short]

The week number of the month, starting with 1 for the first week of the month. Use startDayOfWeek = 1 to specify that weeks start on Sunday, and 2 on Monday.

virtual short WeekOfMonth[short startDayOfWeek] { get; }

Parameters

startDayOfWeek short

Returns

short

WeekOfYear[short]

The week number of the year, starting with 1 for first week of the year. Use startDayOfWeek = 1 to specify that weeks start on Sunday, and 2 on Monday.

virtual short WeekOfYear[short startDayOfWeek] { get; }

Parameters

startDayOfWeek short

Returns

short

Year

The time's gregorian year.

virtual short Year { get; set; }

Returns

short