TIBCO FTL®
Public Member Functions | Properties | List of all members
TIBCO.FTL.TibDateTime Class Reference

This class represents date and time values with large range and nanosecond precision. More...

Inheritance diagram for TIBCO.FTL.TibDateTime:

Public Member Functions

int CompareTo (object obj)
 Compares the current TibDateTime object with its argument. More...
 
void Dispose ()
 
override bool Equals (Object obj)
 Determine whether two TibDateTime objects represent the same value. More...
 
override int GetHashCode ()
 Returns the hash code for this instance. More...
 
void Set (long sec, long nsec)
 Modify a TibDateTime object by setting its seconds and nanoseconds components. More...
 
 TibDateTime ()
 Create a TibDateTime object denoting January 1, 1970, 00:00:00.000000000 GMT (that is, the epoch). More...
 
 TibDateTime (long sec, long nsec)
 Construct a new TibDateTime object by setting its seconds and nanoseconds components. More...
 
 TibDateTime (DateTime dt)
 Construct a new TibDateTime object so it represents a time equivalent to an existing TibDateTime object. More...
 
override String ToString ()
 Return printable a string representation of this TibDateTime object. More...
 

Properties

DateTime Date [get, set]
 Programs can use this property to convert between TibDateTime and .NET DateTime representations. More...
 
long Nanoseconds [get]
 Get the nanoseconds component of a TibDateTime object. More...
 
long Seconds [get]
 Get the seconds component of a TibDateTime object. More...
 
long Ticks [get, set]
 Get or set a TibDateTime object in ticks (100 nanosecond units). More...
 

Detailed Description

This class represents date and time values with large range and nanosecond precision.

TibDateTime values combine two numeric components.

For example, the value -1 seconds plus 999,999,998 nanoseconds represents December 31, 1969, 2 nanoseconds before midnight (that is, 2 nanoseconds before the epoch).

Constructor & Destructor Documentation

TIBCO.FTL.TibDateTime.TibDateTime ( )
inline

Create a TibDateTime object denoting January 1, 1970, 00:00:00.000000000 GMT (that is, the epoch).

TIBCO.FTL.TibDateTime.TibDateTime ( long  sec,
long  nsec 
)
inline

Construct a new TibDateTime object by setting its seconds and nanoseconds components.

Parameters
secSeconds. Positive values represent seconds since the epoch. Negative values represent seconds before the epoch.
nsecNanoseconds after the time that the sec argument denotes; must be in the range [0, 999999999].
TIBCO.FTL.TibDateTime.TibDateTime ( DateTime  dt)
inline

Construct a new TibDateTime object so it represents a time equivalent to an existing TibDateTime object.

Parameters
dtThe constructor copies this TibDateTime object.

Member Function Documentation

int TIBCO.FTL.TibDateTime.CompareTo ( object  obj)
inline

Compares the current TibDateTime object with its argument.

and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

Parameters
objThe method compares this object against the current instance.
Returns
An integer that indicates the relative order of the objects being compared.
  • 1 when this instance is greater than (later than) the method's argument
  • 0 when this instance is equal to the method's argument
  • -1 when this instance is less than (earlier than) the method's argument
Exceptions
ArgumentExceptionobj is not a TibDateTime object.
void TIBCO.FTL.TibDateTime.Dispose ( )
inline
override bool TIBCO.FTL.TibDateTime.Equals ( Object  obj)
inline

Determine whether two TibDateTime objects represent the same value.

Parameters
objA TibDateTime object.
Returns
true if obj is a TibDateTime object, and it has value the same value as this instance; otherwise, false.
override int TIBCO.FTL.TibDateTime.GetHashCode ( )
inline

Returns the hash code for this instance.

Returns
A 32-bit signed integer hash code.
void TIBCO.FTL.TibDateTime.Set ( long  sec,
long  nsec 
)
inline

Modify a TibDateTime object by setting its seconds and nanoseconds components.

Parameters
secSeconds. Positive values represent seconds since the epoch. Negative values represent seconds before the epoch.
nsecNanoseconds after the time that the sec argument denotes; must be in the range [0, 999999999].
Exceptions
FTLInvalidArgumentExceptionThe value supplied for nsec is not in the range [0, 999999999].
override String TIBCO.FTL.TibDateTime.ToString ( )
inline

Return printable a string representation of this TibDateTime object.

Returns
A string representing the TibDateTime value.

Property Documentation

DateTime TIBCO.FTL.TibDateTime.Date
getset

Programs can use this property to convert between TibDateTime and .NET DateTime representations.

Get converts the value of the TibDateTime object, returning a .NET DateTime value.

Set converts a .NET DateTime value, and stores the result in the TibDateTime object.

TibDateTime values can represent time with nanosecond precision, but .NET DateTime values represent time in ticks (which are units of 100 nanoseconds). The Get accessor of this property truncates the nanoseconds component down to whole ticks.

The value ranges of TibDateTime and .NET DateTime overlap, but are not identical. When a conversion would result in an out-of-range value, the accessor throws an exception.

long TIBCO.FTL.TibDateTime.Nanoseconds
get

Get the nanoseconds component of a TibDateTime object.

Nanoseconds are after the time that the seconds component denotes.

long TIBCO.FTL.TibDateTime.Seconds
get

Get the seconds component of a TibDateTime object.

Seconds are relative to the epoch – namely, January 1, 1970, 00:00:00 GMT.

long TIBCO.FTL.TibDateTime.Ticks
getset

Get or set a TibDateTime object in ticks (100 nanosecond units).