Asposecpplib

Namespace name alias. More...

Public Member Functions

ASPOSECPP_SHARED_API DateTime ()
 Constructs an instance that represents the smallest possible date and time value equal to MinValue. More...
 
ASPOSECPP_SHARED_API DateTime (int year, int month, int day, DateTimeKind kind=DateTimeKind::Unspecified)
 Constructs an instance that represents a date and time value specified as a particular year, month and day. More...
 
ASPOSECPP_SHARED_API DateTime (int year, int month, int day, int hour, int minute, int second, DateTimeKind kind=DateTimeKind::Unspecified)
 Constructs an instance that represents a date and time value specified as a particular year, month, day, hour, minute and second. More...
 
ASPOSECPP_SHARED_API DateTime (int year, int month, int day, int hour, int minute, int second, const SharedPtr< Globalization::Calendar > &calendar)
 Constructs an instance that represents a date and time value specified as a particular year, month, day, hour, minute and second in the specified calendar. More...
 
ASPOSECPP_SHARED_API DateTime (int year, int month, int day, int hour, int minute, int second, int millisecond, DateTimeKind kind=DateTimeKind::Unspecified)
 Constructs an instance that represents a date and time value specified as a particular year, month, day, hour, minute, second and millisecond. More...
 
ASPOSECPP_SHARED_API DateTime (int64_t dotNetTicks, DateTimeKind kind=DateTimeKind::Unspecified)
 Construct an instance that represents a date and time value specified as a number of ticks. More...
 
ASPOSECPP_SHARED_API DateTime (const DateTime &dt)
 Copy-constructs an instance. More...
 
ASPOSECPP_SHARED_API ~DateTime ()
 Destructor. More...
 
ASPOSECPP_SHARED_API DateTimeoperator= (const DateTime &dt)
 Assigns the value represented by the specified DateTime instance to the current object. More...
 
ASPOSECPP_SHARED_API DateTime get_Date () const
 Returns a new instance of DateTime class that represents the date portion of the date and time represented by the current object with each component of the time portion set to 0. More...
 
ASPOSECPP_SHARED_API DayOfWeek get_DayOfWeek () const
 Returns a value representing a day of week that is represented by the current object. More...
 
ASPOSECPP_SHARED_API DateTimeKind get_Kind () const
 Returns the value representing if the date and time represented by the current object is a local or UTC date and time or neither. More...
 
ASPOSECPP_SHARED_API TimeSpan get_TimeOfDay () const
 Returns the value that represents the time interval from the beginning of the day represented by the current object till the date and time value represented by the current object. More...
 
ASPOSECPP_SHARED_API int get_DayOfYear () const
 Returns the ordinal number of the day in the year represented by the current object. More...
 
ASPOSECPP_SHARED_API int get_Year () const
 Returns the year represented by the current object. More...
 
ASPOSECPP_SHARED_API int get_Month () const
 Returns the ordinal number of the month in the year represented by the current object. More...
 
ASPOSECPP_SHARED_API int get_Day () const
 Returns the ordinal number of the day in the month represented by the current object. More...
 
ASPOSECPP_SHARED_API int get_Hour () const
 Returns the hour component of the date and time value represented by the current object. More...
 
ASPOSECPP_SHARED_API int get_Minute () const
 Returns the minute component of the date and time value represented by the current object. More...
 
ASPOSECPP_SHARED_API int get_Second () const
 Returns the second component of the date and time value represented by the current object. More...
 
ASPOSECPP_SHARED_API int get_Millisecond () const
 Returns the millisecond component of the date and time value represented by the current object. More...
 
ASPOSECPP_SHARED_API int64_t get_Ticks () const
 Returns a number of 100-nanosecond intervals passed since 0:00:00 UTC, January 1, 0001, in the Gregorian calendar until the date and time represented by the current object. More...
 
ASPOSECPP_SHARED_API DateTime Add (TimeSpan tm) const
 Returns a new instance of DateTime class that represents a date and time value that results from addition of the specified time span to the date and time value represented by the current object. More...
 
ASPOSECPP_SHARED_API DateTime AddYears (int value) const
 Returns a new instance of the DateTime class representing the date and time value equal to that represented by the current object with the year component increased by the specified numeber. More...
 
ASPOSECPP_SHARED_API DateTime AddMonths (int value) const
 Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of months. More...
 
ASPOSECPP_SHARED_API DateTime AddDays (double value) const
 Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of days. More...
 
ASPOSECPP_SHARED_API DateTime AddHours (double value) const
 Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of hours. More...
 
ASPOSECPP_SHARED_API DateTime AddMinutes (double value) const
 Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of minutes. More...
 
ASPOSECPP_SHARED_API DateTime AddSeconds (double value) const
 Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of seconds. More...
 
ASPOSECPP_SHARED_API DateTime AddMilliseconds (double value) const
 Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of milliseconds. More...
 
ASPOSECPP_SHARED_API DateTime AddTicks (uint64_t value) const
 Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of 100-nonosecond intervals. More...
 
ASPOSECPP_SHARED_API DateTime Subtract (TimeSpan duration) const
 Returns a new instance of the DateTime class representing the date and time value which is the result of subtraction of the specified time span from the value represented by the current object. More...
 
ASPOSECPP_SHARED_API TimeSpan Subtract (DateTime value) const
 Returns an instance of TimeSpan class representing the time interval between the date and time values represented by the current and the specified objects. More...
 
ASPOSECPP_SHARED_API DateTime ToLocalTime () const
 Returns a new instance of DateTime class that represents the date and time value represented by the current object as local time. More...
 
ASPOSECPP_SHARED_API DateTime ToUniversalTime () const
 Returns a new instance of DateTime class that represents the date and time value represented by the current object as UTC. More...
 
ASPOSECPP_SHARED_API time_t ToUnixTime () const
 Returns a value that represents the date and time value represented by the current object as Unix time. More...
 
ASPOSECPP_SHARED_API int64_t ToFileTime () const
 Returns a value that represents the date and time value represented by the current object as File time. More...
 
ASPOSECPP_SHARED_API int CompareTo (DateTime value) const
 Compares two date and time values represented by the current object and the specified instance of DateTime class and returns the value indicating values' relative positions on the time line. More...
 
ASPOSECPP_SHARED_API bool Equals (DateTime t1)
 Determines if the specified instance of DateTime class represent the same date and time value as the current object. More...
 
ASPOSECPP_SHARED_API bool Equals (const DateTime &t1) const
 Determines if the specified instance of DateTime class represent the same date and time value as the current object. More...
 
ASPOSECPP_SHARED_API int GetHashCode () const
 Returns a hash code for the current object. More...
 
ASPOSECPP_SHARED_API uint64_t ToBinary () const
 Serializes the current object. More...
 
ASPOSECPP_SHARED_API uint64_t ToFileTimeUtc () const
 Converts the date and time value represented by the current object to File time UTC. More...
 
ASPOSECPP_SHARED_API double ToOADate () const
 Returns the date and time value represented by the current object as OLE Automation Date. More...
 
ASPOSECPP_SHARED_API String ToString () const
 Returns the string representation of the date and time value represented by the current object using the formatting conventions defnied by the current culture. More...
 
ASPOSECPP_SHARED_API String ToString (const String &format) const
 Returns a string representation of the date and time value represented by the current object using the specified format and formatting conventions defined by the current culture. More...
 
ASPOSECPP_SHARED_API String ToString (const SharedPtr< IFormatProvider > &formatProvider) const
 Returns a string representation of the date and time value represented by the current object using the specified format information. More...
 
ASPOSECPP_SHARED_API String ToString (const String &format, const SharedPtr< IFormatProvider > &formatProvider) const
 Returns a string representation of the date and time value represented by the current object using the specified format information. More...
 
ASPOSECPP_SHARED_API String ToShortDateString () const
 Returns a string that contains the short date string representation of the current object. More...
 
ASPOSECPP_SHARED_API String ToLongDateString () const
 Returns a string that contains the long date string representation of the current object. More...
 
ASPOSECPP_SHARED_API String ToShortTimeString () const
 Returns a string that contains the short time string representation of the current object. More...
 
ASPOSECPP_SHARED_API String ToLongTimeString () const
 Returns a string that contains the long time string representation of the current object. More...
 
ASPOSECPP_SHARED_API System::ArrayPtr< System::StringGetDateTimeFormats ()
 NOT IMPLEMENTED. More...
 
ASPOSECPP_SHARED_API System::ArrayPtr< System::StringGetDateTimeFormats (char_t format)
 NOT IMPLEMENTED. More...
 
ASPOSECPP_SHARED_API System::ArrayPtr< System::StringGetDateTimeFormats (const SharedPtr< IFormatProvider > &formatProvider)
 NOT IMPLEMENTED. More...
 
bool ASPOSECPP_SHARED_API IsDaylightSavingTime ()
 Determines if the date and time value represented by the current object falls in the range of daylight saving time for the current time zone. More...
 
ASPOSECPP_SHARED_API bool operator== (const DateTime &other) const
 Determines if the current object and the specified DateTime object represent the same date and time value. More...
 
ASPOSECPP_SHARED_API bool operator!= (const DateTime &other) const
 Determines if the current object and the specified DateTime object represent distinct date and time values. More...
 
ASPOSECPP_SHARED_API bool operator< (const DateTime &other) const
 Determines if the current object represents the date and time value that is earlier than the value represented by the specified DateTime object. More...
 
ASPOSECPP_SHARED_API bool operator<= (const DateTime &other) const
 Determines if the current object represents the date and time value that is earlier than or the same as the value represented by the specified DateTime object. More...
 
ASPOSECPP_SHARED_API bool operator> (const DateTime &other) const
 Determines if the current object represents the date and time value that is later than the value represented by the specified DateTime object. More...
 
ASPOSECPP_SHARED_API bool operator>= (const DateTime &other) const
 Determines if the current object represents the date and time value that is later than or the same as the value represented by the specified DateTime object. More...
 
ASPOSECPP_SHARED_API DateTime operator+ (const TimeSpan &value) const
 Returns a new instance of DateTime class that represents the date and time value that is the sum of the value represented by the current object and the specified time span. More...
 
ASPOSECPP_SHARED_API DateTime operator- (const TimeSpan &value) const
 Returns a new instance of the DateTime class representing the date and time value which is the result of subtraction of the specified time span from the value represented by the current object. More...
 
ASPOSECPP_SHARED_API DateTimeoperator+= (const TimeSpan &value)
 Sets the current object to the date and time value that is the sum of the value represented by the current object and the specified time span. More...
 
ASPOSECPP_SHARED_API DateTimeoperator-= (const TimeSpan &value)
 Sets the current object to the date and time value that is the result of subtraction of the specified time span from the date and time value represented by the current object. More...
 
ASPOSECPP_SHARED_API TimeSpan operator- (const DateTime &value) const
 Returns an instance of TimeSpan class that represents the time interval between the date and time values represented by the current and the specified objects. More...
 
bool IsNull () const
 Always returns false. More...
 
ASPOSECPP_SHARED_API bool operator== (std::nullptr_t) const
 Always returns false. More...
 
ASPOSECPP_SHARED_API bool operator!= (std::nullptr_t) const
 Always returns true. More...
 
ASPOSECPP_SHARED_API bool operator< (std::nullptr_t) const
 Always returns false. More...
 
ASPOSECPP_SHARED_API bool operator<= (std::nullptr_t) const
 Always returns false. More...
 
ASPOSECPP_SHARED_API bool operator> (std::nullptr_t) const
 Always returns false. More...
 
ASPOSECPP_SHARED_API bool operator>= (std::nullptr_t) const
 Always returns false. More...
 

Static Public Member Functions

static ASPOSECPP_SHARED_API DateTime get_Now ()
 Returns an instance of DateTime class that represents the current time as local time. More...
 
static ASPOSECPP_SHARED_API DateTime get_UtcNow ()
 Returns an instance of DateTime class that represents the current time as UTC. More...
 
static ASPOSECPP_SHARED_API DateTime get_Today ()
 Returns an instance of DateTime class that represents the current date with each component of time portion of the value represented by the object set to 0. More...
 
static ASPOSECPP_SHARED_API int Compare (DateTime t1, DateTime t2)
 Compares two values represented by the specified instances of DateTime class and returns the value indicating values' relative positions on the time line. More...
 
static ASPOSECPP_SHARED_API bool Equals (DateTime t1, DateTime t2)
 Determines if the specified instances of DateTime class represent the same date and time value. More...
 
static ASPOSECPP_SHARED_API bool Equals (const DateTime &t1, const DateTime &t2)
 Determines if the specified instances of DateTime class represent the same date and time value. More...
 
static ASPOSECPP_SHARED_API DateTime FromBinary (uint64_t value)
 Deserializes the date time value from the specified unsigned 64-bit integer and sets the new instance of DateTime class to that value. More...
 
static ASPOSECPP_SHARED_API DateTime FromFileTimeUtc (uint64_t fileTime)
 Converts the specified File time to an instance of DateTime class representing the same date and time value as UTC time. More...
 
static ASPOSECPP_SHARED_API DateTime FromOADate (double date)
 Returns an instance of DateTime class representing the date and time value equivalent to the specified OLE Automation Date. More...
 
static ASPOSECPP_SHARED_API DateTime ParseExact (const String &strTime, const String &format, const SharedPtr< IFormatProvider > &formatProvider)
 Converts the specified string representation of a date and time value to the equivalent DateTime object using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly. Throws an exception if the conversion fails. More...
 
static ASPOSECPP_SHARED_API DateTime ParseExact (const String &s, const String &format, const SharedPtr< IFormatProvider > &provider, Globalization::DateTimeStyles style)
 Converts the specified string representation of a date and time value to the equivalent DateTime object using the specified format, culture-specific format information and style. The format of the string representation must match the specified format exactly. Throws an exception if the conversion fails. More...
 
static ASPOSECPP_SHARED_API DateTime ParseExact (const String &s, const System::ArrayPtr< System::String > &formats, const SharedPtr< IFormatProvider > &provider, Globalization::DateTimeStyles style)
 Converts the specified string representation of a date and time value to the equivalent DateTime object using the specified formats, culture-specific format information and style. The format of the string representation must match one or more of the specified formats exactly. Throws an exception if the conversion fails. More...
 
static ASPOSECPP_SHARED_API bool TryParse (const String &strTime, DateTime &out)
 Converts the specified string representation of a date and time value to the equivalent DateTime object. More...
 
static ASPOSECPP_SHARED_API bool TryParse (const String &strTime, const SharedPtr< IFormatProvider > &fp, Globalization::DateTimeStyles style, DateTime &out)
 Converts the specified string representation of a date and time value to the equivalent DateTime object using the specified culture-specific format information and style. More...
 
static ASPOSECPP_SHARED_API bool TryParseExact (const String &strTime, const String &format, const SharedPtr< IFormatProvider > &provider, Globalization::DateTimeStyles style, DateTime &out)
 Converts the specified string representation of a date and time value to the equivalent DateTime object using the specified format, culture-specific format information and style. The format of the string representation must match the specified format exactly. More...
 
static ASPOSECPP_SHARED_API bool TryParseExact (const String &s, const System::ArrayPtr< System::String > &formats, const SharedPtr< IFormatProvider > &provider, Globalization::DateTimeStyles style, DateTime &result)
 Converts the specified string representation of a date and time value to the equivalent DateTime object using the specified formats, culture-specific format information and style. The format of the string representation must match one or more of the specified formats exactly. More...
 
static ASPOSECPP_SHARED_API DateTime Parse (const String &strTime)
 Converts the specified string representation of a date and time value to the equivalent DateTime object. More...
 
static ASPOSECPP_SHARED_API DateTime Parse (const String &strTime, const SharedPtr< IFormatProvider > &formatProvider)
 Converts the specified string representation of a date and time value to the equivalent DateTime object using culture-specific format information. More...
 
static ASPOSECPP_SHARED_API DateTime Parse (const String &strTime, const SharedPtr< IFormatProvider > &formatProvider, System::Globalization::DateTimeStyles styles)
 Converts the specified string representation of a date and time value to the equivalent DateTime object using culture-specific format information. More...
 
static ASPOSECPP_SHARED_API DateTime Parse (const String &strTime, System::Globalization::DateTimeStyles styles)
 Converts the specified string representation of a date and time value to the equivalent DateTime object using culture-specific format information. More...
 
static ASPOSECPP_SHARED_API DateTime FromUnixTime (time_t value)
 Converts the specified Unix time value to an instance of DateTime class. More...
 
static ASPOSECPP_SHARED_API DateTime FromFileTime (int64_t value)
 Converts the specified File time to an instance of DateTime class representing the same date and time value as local time. More...
 
static ASPOSECPP_SHARED_API int DaysInMonth (int year, int month)
 Returns the number of days in the specified month of the specified year. More...
 
static ASPOSECPP_SHARED_API bool IsLeapYear (int year)
 Determines of the specified year is a leap year. More...
 
static ASPOSECPP_SHARED_API DateTime SpecifyKind (DateTime value, DateTimeKind kind)
 Constructs a new DateTime object that represents the same number of ticks as the specified DateTime object and represents local time, UTC time or neither as specified by the argument kind. More...
 
static const TypeInfoType ()
 Returns a TypeInfo object that contains information about this class. More...
 

Static Public Attributes

static const DateTime ASPOSECPP_SHARED_API MinValue
 An instance of DateTime class that represents the minimal possible date and time value. More...
 
static const DateTime ASPOSECPP_SHARED_API MaxValue
 An instance of DateTime class that represents the maximal possible date and time value. More...
 

Detailed Description

Namespace name alias.

Represents a specific date and time value on the time continuum. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.

Constructor & Destructor Documentation

◆ DateTime() [1/7]

ASPOSECPP_SHARED_API System::DateTime::DateTime ( )

Constructs an instance that represents the smallest possible date and time value equal to MinValue.

◆ DateTime() [2/7]

ASPOSECPP_SHARED_API System::DateTime::DateTime ( int  year,
int  month,
int  day,
DateTimeKind  kind = DateTimeKind::Unspecified 
)

Constructs an instance that represents a date and time value specified as a particular year, month and day.

Parameters
yearThe year to be represenetd by the instance being constructed
monthThe month of the year to be represented by the instance being constructed
dayThe day of the month to be represented by the instance being constructed
kindThe value that indicates if year, month and day parameters specify a local time, UTC time or neither.

◆ DateTime() [3/7]

ASPOSECPP_SHARED_API System::DateTime::DateTime ( int  year,
int  month,
int  day,
int  hour,
int  minute,
int  second,
DateTimeKind  kind = DateTimeKind::Unspecified 
)

Constructs an instance that represents a date and time value specified as a particular year, month, day, hour, minute and second.

Parameters
yearThe year to be represenetd by the instance being constructed
monthThe month of the year to be represented by the instance being constructed
dayThe day of the month to be represented by the instance being constructed
hourThe hour of the day to be represented by the instance being constructed
minuteThe minute of the hour to be represented by the instance being constructed
secondThe second of the minute te be represented by the instance being constructed
kindThe value that indicates if the provided date and time parameters specify a local time, UTC time or neither.

◆ DateTime() [4/7]

ASPOSECPP_SHARED_API System::DateTime::DateTime ( int  year,
int  month,
int  day,
int  hour,
int  minute,
int  second,
const SharedPtr< Globalization::Calendar > &  calendar 
)

Constructs an instance that represents a date and time value specified as a particular year, month, day, hour, minute and second in the specified calendar.

Parameters
yearThe year to be represenetd by the instance being constructed
monthThe month of the year to be represented by the instance being constructed
dayThe day of the month to be represented by the instance being constructed
hourThe hour of the day to be represented by the instance being constructed
minuteThe minute of the hour to be represented by the instance being constructed
secondThe second of the minute te be represented by the instance being constructed
calendarThe calendar used to interpret the specified year, month and day.

◆ DateTime() [5/7]

ASPOSECPP_SHARED_API System::DateTime::DateTime ( int  year,
int  month,
int  day,
int  hour,
int  minute,
int  second,
int  millisecond,
DateTimeKind  kind = DateTimeKind::Unspecified 
)

Constructs an instance that represents a date and time value specified as a particular year, month, day, hour, minute, second and millisecond.

Parameters
yearThe year to be represenetd by the instance being constructed
monthThe month of the year to be represented by the instance being constructed
dayThe day of the month to be represented by the instance being constructed
hourThe hour of the day to be represented by the instance being constructed
minuteThe minute of the hour to be represented by the instance being constructed
secondThe second of the minute te be represented by the instance being constructed
millisecondThe millisecond of the second to be represented by the instance being constructed
kindThe value that indicates if the provided date and time parameters specify a local time, UTC time or neither.

◆ DateTime() [6/7]

ASPOSECPP_SHARED_API System::DateTime::DateTime ( int64_t  dotNetTicks,
DateTimeKind  kind = DateTimeKind::Unspecified 
)

Construct an instance that represents a date and time value specified as a number of ticks.

Parameters
dotNetTicksThe number of 100-ns intervals that have passed since January the 1st, 0001 00:00:00.000 in Georgian calendar
kindThe value that indicates if dotnetTicks parameter specifies a local time, UTC time or neither.

◆ DateTime() [7/7]

ASPOSECPP_SHARED_API System::DateTime::DateTime ( const DateTime dt)

Copy-constructs an instance.

Parameters
dtAn instance of DateTime class to copy the represented date and time value from

◆ ~DateTime()

ASPOSECPP_SHARED_API System::DateTime::~DateTime ( )

Destructor.

Member Function Documentation

◆ Add()

ASPOSECPP_SHARED_API DateTime System::DateTime::Add ( TimeSpan  tm) const

Returns a new instance of DateTime class that represents a date and time value that results from addition of the specified time span to the date and time value represented by the current object.

Parameters
tmThe time interval to add
Returns
A new instance of DateTime class that represents a date and time value that results from addition of tm time span to the date and time value represented by the current object

◆ AddDays()

ASPOSECPP_SHARED_API DateTime System::DateTime::AddDays ( double  value) const

Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of days.

Parameters
valueThe number of days to add; the value can be positive or negative
Returns
A new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and value days

◆ AddHours()

ASPOSECPP_SHARED_API DateTime System::DateTime::AddHours ( double  value) const

Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of hours.

Parameters
valueThe number of hours to add; the value can be positive or negative
Returns
A new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and value hours

◆ AddMilliseconds()

ASPOSECPP_SHARED_API DateTime System::DateTime::AddMilliseconds ( double  value) const

Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of milliseconds.

Parameters
valueThe number of milliseconds to add; the value can be positive or negative
Returns
A new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and value milliseconds

◆ AddMinutes()

ASPOSECPP_SHARED_API DateTime System::DateTime::AddMinutes ( double  value) const

Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of minutes.

Parameters
valueThe number of minutes to add; the value can be positive or negative
Returns
A new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and value minutes

◆ AddMonths()

ASPOSECPP_SHARED_API DateTime System::DateTime::AddMonths ( int  value) const

Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of months.

Parameters
valueThe number of months to add; the value can be positive or negative
Returns
A new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and value months

◆ AddSeconds()

ASPOSECPP_SHARED_API DateTime System::DateTime::AddSeconds ( double  value) const

Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of seconds.

Parameters
valueThe number of seconds to add; the value can be positive or negative
Returns
A new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and value seconds

◆ AddTicks()

ASPOSECPP_SHARED_API DateTime System::DateTime::AddTicks ( uint64_t  value) const

Returns a new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and the specified number of 100-nonosecond intervals.

Parameters
valueThe number of 100-nonosecond intervals to add; the value can be positive or negative
Returns
A new instance of the DateTime class representing the date and time value which is the sum of the value represented by the current object and value of 100-nonosecond intervals

◆ AddYears()

ASPOSECPP_SHARED_API DateTime System::DateTime::AddYears ( int  value) const

Returns a new instance of the DateTime class representing the date and time value equal to that represented by the current object with the year component increased by the specified numeber.

Parameters
valueThe number of years to add; the value can be positive or negative
Returns
A new instance of the DateTime class representing the date and time value equal to that represented by the current object with the year component increased by value

◆ Compare()

static ASPOSECPP_SHARED_API int System::DateTime::Compare ( DateTime  t1,
DateTime  t2 
)
static

Compares two values represented by the specified instances of DateTime class and returns the value indicating values' relative positions on the time line.

Parameters
t1The first comparand
t2The second comparand
Returns
A value that is less than 0 if t1 is earlier than t2; 0 if t1 is the same as t2; a value that is greater than 0 if t1 is later than t2

◆ CompareTo()

ASPOSECPP_SHARED_API int System::DateTime::CompareTo ( DateTime  value) const

Compares two date and time values represented by the current object and the specified instance of DateTime class and returns the value indicating values' relative positions on the time line.

Parameters
valueAn instance of DateTime class to compare the current object with
Returns
A value that is less than 0 if the current object represents a value that is earlier than that represented by value; 0 if values reprsented by both objects are the same; a value that is greater than 0 if the value represented by the current object is later than that represented by value

◆ DaysInMonth()

static ASPOSECPP_SHARED_API int System::DateTime::DaysInMonth ( int  year,
int  month 
)
static

Returns the number of days in the specified month of the specified year.

Parameters
yearThe year
monthThe ordinal number of the month
Returns
The number of days is the specified month of the specified year

◆ Equals() [1/4]

static ASPOSECPP_SHARED_API bool System::DateTime::Equals ( DateTime  t1,
DateTime  t2 
)
static

Determines if the specified instances of DateTime class represent the same date and time value.

Parameters
t1The first comparand
t2The second comparand
Returns
True if both t1 and t2 represent the same value, otherwise - false

◆ Equals() [2/4]

static ASPOSECPP_SHARED_API bool System::DateTime::Equals ( const DateTime t1,
const DateTime t2 
)
static

Determines if the specified instances of DateTime class represent the same date and time value.

Parameters
t1The first comparand
t2The second comparand
Returns
True if both t1 and t2 represent the same value, otherwise - false

◆ Equals() [3/4]

ASPOSECPP_SHARED_API bool System::DateTime::Equals ( DateTime  t1)

Determines if the specified instance of DateTime class represent the same date and time value as the current object.

Parameters
t1The instance of DateTime class to compare current object with
Returns
True if both t1 and current object represent the same value, otherwise - false

◆ Equals() [4/4]

ASPOSECPP_SHARED_API bool System::DateTime::Equals ( const DateTime t1) const

Determines if the specified instance of DateTime class represent the same date and time value as the current object.

Parameters
t1The instance of DateTime class to compare current object with
Returns
True if both t1 and current object represent the same value, otherwise - false

◆ FromBinary()

static ASPOSECPP_SHARED_API DateTime System::DateTime::FromBinary ( uint64_t  value)
static

Deserializes the date time value from the specified unsigned 64-bit integer and sets the new instance of DateTime class to that value.

Parameters
valueThe 64-bit intger to deserialize the date and time value from
Returns
A new instance of DateTime class representing the date and time value deserialized from the specifed unsigned 64-bit integer value

◆ FromFileTime()

static ASPOSECPP_SHARED_API DateTime System::DateTime::FromFileTime ( int64_t  value)
static

Converts the specified File time to an instance of DateTime class representing the same date and time value as local time.

Parameters
valueFile time to convert
Returns
A new instance of DateTime class representing the same date and time as fileTime

◆ FromFileTimeUtc()

static ASPOSECPP_SHARED_API DateTime System::DateTime::FromFileTimeUtc ( uint64_t  fileTime)
static

Converts the specified File time to an instance of DateTime class representing the same date and time value as UTC time.

Parameters
fileTimeFile time to convert
Returns
A new instance of DateTime class representing the same date and time as fileTime

◆ FromOADate()

static ASPOSECPP_SHARED_API DateTime System::DateTime::FromOADate ( double  date)
static

Returns an instance of DateTime class representing the date and time value equivalent to the specified OLE Automation Date.

Parameters
dateOLE Automation Date to convert to DateTime object
Returns
A new instance of DateTime class representing the same date and time as date

◆ FromUnixTime()

static ASPOSECPP_SHARED_API DateTime System::DateTime::FromUnixTime ( time_t  value)
static

Converts the specified Unix time value to an instance of DateTime class.

Parameters
valueUnix time value to convert
Returns
A new instance of DateTime class representing the same date and time as value

◆ get_Date()

ASPOSECPP_SHARED_API DateTime System::DateTime::get_Date ( ) const

Returns a new instance of DateTime class that represents the date portion of the date and time represented by the current object with each component of the time portion set to 0.

◆ get_Day()

ASPOSECPP_SHARED_API int System::DateTime::get_Day ( ) const

Returns the ordinal number of the day in the month represented by the current object.

◆ get_DayOfWeek()

ASPOSECPP_SHARED_API DayOfWeek System::DateTime::get_DayOfWeek ( ) const

Returns a value representing a day of week that is represented by the current object.

◆ get_DayOfYear()

ASPOSECPP_SHARED_API int System::DateTime::get_DayOfYear ( ) const

Returns the ordinal number of the day in the year represented by the current object.

◆ get_Hour()

ASPOSECPP_SHARED_API int System::DateTime::get_Hour ( ) const

Returns the hour component of the date and time value represented by the current object.

◆ get_Kind()

ASPOSECPP_SHARED_API DateTimeKind System::DateTime::get_Kind ( ) const

Returns the value representing if the date and time represented by the current object is a local or UTC date and time or neither.

◆ get_Millisecond()

ASPOSECPP_SHARED_API int System::DateTime::get_Millisecond ( ) const

Returns the millisecond component of the date and time value represented by the current object.

◆ get_Minute()

ASPOSECPP_SHARED_API int System::DateTime::get_Minute ( ) const

Returns the minute component of the date and time value represented by the current object.

◆ get_Month()

ASPOSECPP_SHARED_API int System::DateTime::get_Month ( ) const

Returns the ordinal number of the month in the year represented by the current object.

◆ get_Now()

static ASPOSECPP_SHARED_API DateTime System::DateTime::get_Now ( )
static

Returns an instance of DateTime class that represents the current time as local time.

◆ get_Second()

ASPOSECPP_SHARED_API int System::DateTime::get_Second ( ) const

Returns the second component of the date and time value represented by the current object.

◆ get_Ticks()

ASPOSECPP_SHARED_API int64_t System::DateTime::get_Ticks ( ) const

Returns a number of 100-nanosecond intervals passed since 0:00:00 UTC, January 1, 0001, in the Gregorian calendar until the date and time represented by the current object.

◆ get_TimeOfDay()

ASPOSECPP_SHARED_API TimeSpan System::DateTime::get_TimeOfDay ( ) const

Returns the value that represents the time interval from the beginning of the day represented by the current object till the date and time value represented by the current object.

◆ get_Today()

static ASPOSECPP_SHARED_API DateTime System::DateTime::get_Today ( )
static

Returns an instance of DateTime class that represents the current date with each component of time portion of the value represented by the object set to 0.

◆ get_UtcNow()

static ASPOSECPP_SHARED_API DateTime System::DateTime::get_UtcNow ( )
static

Returns an instance of DateTime class that represents the current time as UTC.

◆ get_Year()

ASPOSECPP_SHARED_API int System::DateTime::get_Year ( ) const

Returns the year represented by the current object.

◆ GetDateTimeFormats() [1/3]

ASPOSECPP_SHARED_API System::ArrayPtr<System::String> System::DateTime::GetDateTimeFormats ( )

NOT IMPLEMENTED.

Exceptions
NotImplementedExceptionAlways

◆ GetDateTimeFormats() [2/3]

ASPOSECPP_SHARED_API System::ArrayPtr<System::String> System::DateTime::GetDateTimeFormats ( char_t  format)

NOT IMPLEMENTED.

Exceptions
NotImplementedExceptionAlways

◆ GetDateTimeFormats() [3/3]

ASPOSECPP_SHARED_API System::ArrayPtr<System::String> System::DateTime::GetDateTimeFormats ( const SharedPtr< IFormatProvider > &  formatProvider)

NOT IMPLEMENTED.

Exceptions
NotImplementedExceptionAlways

◆ GetHashCode()

ASPOSECPP_SHARED_API int System::DateTime::GetHashCode ( ) const

Returns a hash code for the current object.

◆ IsDaylightSavingTime()

bool ASPOSECPP_SHARED_API System::DateTime::IsDaylightSavingTime ( )

Determines if the date and time value represented by the current object falls in the range of daylight saving time for the current time zone.

Returns
True if the date and time value specified by the current object falls in the range of daylight saving time, otherwise - false

◆ IsLeapYear()

static ASPOSECPP_SHARED_API bool System::DateTime::IsLeapYear ( int  year)
static

Determines of the specified year is a leap year.

Parameters
yearThe year to check
Returns
True if the specified year is a leap year, otherwise - false

◆ IsNull()

bool System::DateTime::IsNull ( ) const
inline

Always returns false.

◆ operator!=() [1/2]

ASPOSECPP_SHARED_API bool System::DateTime::operator!= ( const DateTime other) const

Determines if the current object and the specified DateTime object represent distinct date and time values.

Parameters
otherThe DateTime object to compare the current object with
Returns
True if the current object and the specified object represent distinct date and time values, otherwise - false

◆ operator!=() [2/2]

ASPOSECPP_SHARED_API bool System::DateTime::operator!= ( std::nullptr_t  ) const

Always returns true.

◆ operator+()

ASPOSECPP_SHARED_API DateTime System::DateTime::operator+ ( const TimeSpan value) const

Returns a new instance of DateTime class that represents the date and time value that is the sum of the value represented by the current object and the specified time span.

Parameters
valueThe time span to add to the value represented by the current object
Returns
A new instance of DateTime class that represents the date and time value that is the sum of the value represented by the current object and value.

◆ operator+=()

ASPOSECPP_SHARED_API DateTime& System::DateTime::operator+= ( const TimeSpan value)

Sets the current object to the date and time value that is the sum of the value represented by the current object and the specified time span.

Parameters
valueThe time span to add
Returns
A reference to the self

◆ operator-() [1/2]

ASPOSECPP_SHARED_API DateTime System::DateTime::operator- ( const TimeSpan value) const

Returns a new instance of the DateTime class representing the date and time value which is the result of subtraction of the specified time span from the value represented by the current object.

Parameters
valueA time interval to subtract
Returns
A new instance of the DateTime class representing the date and time value which is the result of subtraction of value from the value represented by the current object.

◆ operator-() [2/2]

ASPOSECPP_SHARED_API TimeSpan System::DateTime::operator- ( const DateTime value) const

Returns an instance of TimeSpan class that represents the time interval between the date and time values represented by the current and the specified objects.

Parameters
valueAn instance of DateTime class that marks one end of the interval to be calculated
Returns
An instance of TimeSpan class representing the time interval between the date and time values represented by the current object and value.

◆ operator-=()

ASPOSECPP_SHARED_API DateTime& System::DateTime::operator-= ( const TimeSpan value)

Sets the current object to the date and time value that is the result of subtraction of the specified time span from the date and time value represented by the current object.

Parameters
valueThe time span to subtract
Returns
A reference to the self

◆ operator<()>[1/2]

ASPOSECPP_SHARED_API bool System::DateTime::operator< ( const DateTime other) const

Determines if the current object represents the date and time value that is earlier than the value represented by the specified DateTime object.

Parameters
otherThe DateTime object to compare the current object with
Returns
True if the date and time value represented by the current object is earlier than the value represented by other, otherwise - false

◆ operator<()>[2/2]

ASPOSECPP_SHARED_API bool System::DateTime::operator< ( std::nullptr_t  ) const

Always returns false.

◆ operator<=()>[1/2]

ASPOSECPP_SHARED_API bool System::DateTime::operator<= ( const DateTime other) const

Determines if the current object represents the date and time value that is earlier than or the same as the value represented by the specified DateTime object.

Parameters
otherThe DateTime object to compare the current object with
Returns
True if the date and time value represented by the current object is earlier than or the same as the value represented by other, otherwise - false

◆ operator<=()>[2/2]

ASPOSECPP_SHARED_API bool System::DateTime::operator<= ( std::nullptr_t  ) const

Always returns false.

◆ operator=()

ASPOSECPP_SHARED_API DateTime& System::DateTime::operator= ( const DateTime dt)

Assigns the value represented by the specified DateTime instance to the current object.

Parameters
dtAn instance of DateTime class to copy the represented date and time value from
Returns
A reference to the self

◆ operator==() [1/2]

ASPOSECPP_SHARED_API bool System::DateTime::operator== ( const DateTime other) const

Determines if the current object and the specified DateTime object represent the same date and time value.

Parameters
otherThe DateTime object to compare the current object with
Returns
True if the current object and the specified object represent the same date and time value, otherwise - false

◆ operator==() [2/2]

ASPOSECPP_SHARED_API bool System::DateTime::operator== ( std::nullptr_t  ) const

Always returns false.

◆ operator>() [1/2]

ASPOSECPP_SHARED_API bool System::DateTime::operator> ( const DateTime other) const

Determines if the current object represents the date and time value that is later than the value represented by the specified DateTime object.

Parameters
otherThe DateTime object to compare the current object with
Returns
True if the date and time value represented by the current object is later than the value represented by other, otherwise - false

◆ operator>() [2/2]

ASPOSECPP_SHARED_API bool System::DateTime::operator> ( std::nullptr_t  ) const

Always returns false.

◆ operator>=() [1/2]

ASPOSECPP_SHARED_API bool System::DateTime::operator>= ( const DateTime other) const

Determines if the current object represents the date and time value that is later than or the same as the value represented by the specified DateTime object.

Parameters
otherThe DateTime object to compare the current object with
Returns
True if the date and time value represented by the current object is later than or the same as the value represented by other, otherwise - false

◆ operator>=() [2/2]

ASPOSECPP_SHARED_API bool System::DateTime::operator>= ( std::nullptr_t  ) const

Always returns false.

◆ Parse() [1/4]

static ASPOSECPP_SHARED_API DateTime System::DateTime::Parse ( const String strTime)
static

Converts the specified string representation of a date and time value to the equivalent DateTime object.

Parameters
strTimeThe string representation of a date and time value to convert
Returns
A new instance of DateTime class that represents the date and time value equivalent to that represented by the specified string

◆ Parse() [2/4]

static ASPOSECPP_SHARED_API DateTime System::DateTime::Parse ( const String strTime,
const SharedPtr< IFormatProvider > &  formatProvider 
)
static

Converts the specified string representation of a date and time value to the equivalent DateTime object using culture-specific format information.

Parameters
strTimeThe string representation of a date and time value to convert
formatProviderThe IFormatProvider object that provides culture-specific format information
Returns
A new instance of DateTime class that represents the date and time value equivalent to that represented by the specified string

◆ Parse() [3/4]

static ASPOSECPP_SHARED_API DateTime System::DateTime::Parse ( const String strTime,
const SharedPtr< IFormatProvider > &  formatProvider,
System::Globalization::DateTimeStyles  styles 
)
static

Converts the specified string representation of a date and time value to the equivalent DateTime object using culture-specific format information.

Parameters
strTimeThe string representation of a date and time value to convert
formatProviderThe IFormatProvider object that provides culture-specific format information
stylesA bitwise combination of the enumeration values that provides additional information about strTime, about style elements that may be present in strTime, or about the conversion from strTime to a DateTime object
Returns
A new instance of DateTime class that represents the date and time value equivalent to that represented by the specified string

◆ Parse() [4/4]

static ASPOSECPP_SHARED_API DateTime System::DateTime::Parse ( const String strTime,
System::Globalization::DateTimeStyles  styles 
)
static

Converts the specified string representation of a date and time value to the equivalent DateTime object using culture-specific format information.

Parameters
strTimeThe string representation of a date and time value to convert
stylesA bitwise combination of the enumeration values that provides additional information about strTime, about style elements that may be present in strTime, or about the conversion from strTime to a DateTime object
Returns
A new instance of DateTime class that represents the date and time value equivalent to that represented by the specified string

◆ ParseExact() [1/3]

static ASPOSECPP_SHARED_API DateTime System::DateTime::ParseExact ( const String strTime,
const String format,
const SharedPtr< IFormatProvider > &  formatProvider 
)
static

Converts the specified string representation of a date and time value to the equivalent DateTime object using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly. Throws an exception if the conversion fails.

Parameters
strTimeThe string representation of a date and time value to convert
formatThe string format
formatProviderThe IFormatProvider object that provides culture-specific format information
Returns
A new instance of DateTime class that represents the date and time value equivalent to that represented by the specified string

◆ ParseExact() [2/3]

static ASPOSECPP_SHARED_API DateTime System::DateTime::ParseExact ( const String s,
const String format,
const SharedPtr< IFormatProvider > &  provider,
Globalization::DateTimeStyles  style 
)
static

Converts the specified string representation of a date and time value to the equivalent DateTime object using the specified format, culture-specific format information and style. The format of the string representation must match the specified format exactly. Throws an exception if the conversion fails.

Parameters
sThe string representation of a date and time value to convert
formatThe string format
providerThe IFormatProvider object that provides culture-specific format information
styleA bitwise combination of the enumeration values that provides additional information about s, about style elements that may be present in s, or about the conversion from s to a DateTime object
Returns
A new instance of DateTime class that represents the date and time value equivalent to that represented by the specified string

◆ ParseExact() [3/3]

static ASPOSECPP_SHARED_API DateTime System::DateTime::ParseExact ( const String s,
const System::ArrayPtr< System::String > &  formats,
const SharedPtr< IFormatProvider > &  provider,
Globalization::DateTimeStyles  style 
)
static

Converts the specified string representation of a date and time value to the equivalent DateTime object using the specified formats, culture-specific format information and style. The format of the string representation must match one or more of the specified formats exactly. Throws an exception if the conversion fails.

Parameters
sThe string representation of a date and time value to convert
formatsThe array of string formats
providerThe IFormatProvider object that provides culture-specific format information
styleA bitwise combination of the enumeration values that provides additional information about s, about style elements that may be present in s, or about the conversion from s to a DateTime object
Returns
A new instance of DateTime class that represents the date and time value equivalent to that represented by the specified string

◆ SpecifyKind()

static ASPOSECPP_SHARED_API DateTime System::DateTime::SpecifyKind ( DateTime  value,
DateTimeKind  kind 
)
static

Constructs a new DateTime object that represents the same number of ticks as the specified DateTime object and represents local time, UTC time or neither as specified by the argument kind.

Parameters
valueThe DateTime object to copy the number of ticks from
kindSpecifies if the new object should represent local time, UTC time or neither.
Returns
A new DateTime object that represents the same number of ticks as value and DateTimeKind value specified by kind.

◆ Subtract() [1/2]

ASPOSECPP_SHARED_API DateTime System::DateTime::Subtract ( TimeSpan  duration) const

Returns a new instance of the DateTime class representing the date and time value which is the result of subtraction of the specified time span from the value represented by the current object.

Parameters
durationA time interval to subtract
Returns
A new instance of the DateTime class representing the date and time value which is the result of subtraction of duration from the value represented by the current object.

◆ Subtract() [2/2]

ASPOSECPP_SHARED_API TimeSpan System::DateTime::Subtract ( DateTime  value) const

Returns an instance of TimeSpan class representing the time interval between the date and time values represented by the current and the specified objects.

Parameters
valueAn instance of DateTime class that marks one end of the interval to be calculated
Returns
An instance of TimeSpan class representing the time interval between the date and time values represented by the current object and value.

◆ ToBinary()

ASPOSECPP_SHARED_API uint64_t System::DateTime::ToBinary ( ) const

Serializes the current object.

Returns
An unsigned 64-bit integer value representing the current object

◆ ToFileTime()

ASPOSECPP_SHARED_API int64_t System::DateTime::ToFileTime ( ) const

Returns a value that represents the date and time value represented by the current object as File time.

◆ ToFileTimeUtc()

ASPOSECPP_SHARED_API uint64_t System::DateTime::ToFileTimeUtc ( ) const

Converts the date and time value represented by the current object to File time UTC.

Returns
The File time value equivalent to the date and time value represented by the current object

◆ ToLocalTime()

ASPOSECPP_SHARED_API DateTime System::DateTime::ToLocalTime ( ) const

Returns a new instance of DateTime class that represents the date and time value represented by the current object as local time.

◆ ToLongDateString()

ASPOSECPP_SHARED_API String System::DateTime::ToLongDateString ( ) const

Returns a string that contains the long date string representation of the current object.

◆ ToLongTimeString()

ASPOSECPP_SHARED_API String System::DateTime::ToLongTimeString ( ) const

Returns a string that contains the long time string representation of the current object.

◆ ToOADate()

ASPOSECPP_SHARED_API double System::DateTime::ToOADate ( ) const

Returns the date and time value represented by the current object as OLE Automation Date.

◆ ToShortDateString()

ASPOSECPP_SHARED_API String System::DateTime::ToShortDateString ( ) const

Returns a string that contains the short date string representation of the current object.

◆ ToShortTimeString()

ASPOSECPP_SHARED_API String System::DateTime::ToShortTimeString ( ) const

Returns a string that contains the short time string representation of the current object.

◆ ToString() [1/4]

ASPOSECPP_SHARED_API String System::DateTime::ToString ( ) const

Returns the string representation of the date and time value represented by the current object using the formatting conventions defnied by the current culture.

Returns
The string representation of the value represented by the current object

◆ ToString() [2/4]

ASPOSECPP_SHARED_API String System::DateTime::ToString ( const String format) const

Returns a string representation of the date and time value represented by the current object using the specified format and formatting conventions defined by the current culture.

Parameters
formatA format string
Returns
The string representation of the value represented by the current object formatted according to format defined by format and the current culture.

◆ ToString() [3/4]

ASPOSECPP_SHARED_API String System::DateTime::ToString ( const SharedPtr< IFormatProvider > &  formatProvider) const

Returns a string representation of the date and time value represented by the current object using the specified format information.

Parameters
formatProviderAn object representing the format information
Returns
The string representation of the value represented by the current object formatted according to format information provided by formatProvider.

◆ ToString() [4/4]

ASPOSECPP_SHARED_API String System::DateTime::ToString ( const String format,
const SharedPtr< IFormatProvider > &  formatProvider 
) const

Returns a string representation of the date and time value represented by the current object using the specified format information.

Parameters
formatA format string
formatProviderAn object representing the format information
Returns
The string representation of the value represented by the current object formatted according to format information provided by formatProvider and format string format.

◆ ToUniversalTime()

ASPOSECPP_SHARED_API DateTime System::DateTime::ToUniversalTime ( ) const

Returns a new instance of DateTime class that represents the date and time value represented by the current object as UTC.

◆ ToUnixTime()

ASPOSECPP_SHARED_API time_t System::DateTime::ToUnixTime ( ) const

Returns a value that represents the date and time value represented by the current object as Unix time.

◆ TryParse() [1/2]

static ASPOSECPP_SHARED_API bool System::DateTime::TryParse ( const String strTime,
DateTime out 
)
static

Converts the specified string representation of a date and time value to the equivalent DateTime object.

Parameters
strTimeThe string representation of a date and time value to convert
outThe output argument that, if the conversion succeeds, contains the result of conversion
Returns
True if conversion succeeds, otherwise - false

◆ TryParse() [2/2]

static ASPOSECPP_SHARED_API bool System::DateTime::TryParse ( const String strTime,
const SharedPtr< IFormatProvider > &  fp,
Globalization::DateTimeStyles  style,
DateTime out 
)
static

Converts the specified string representation of a date and time value to the equivalent DateTime object using the specified culture-specific format information and style.

Parameters
strTimeThe string representation of a date and time value to convert
fpThe IFormatProvider object that provides culture-specific format information
styleA bitwise combination of the enumeration values that provides additional information about strTime, about style elements that may be present in strTime, or about the conversion from strTime to a DateTime object
outThe output argument that, if the conversion succeeds, contains the result of conversion
Returns
True if conversion succeeds, otherwise - false

◆ TryParseExact() [1/2]

static ASPOSECPP_SHARED_API bool System::DateTime::TryParseExact ( const String strTime,
const String format,
const SharedPtr< IFormatProvider > &  provider,
Globalization::DateTimeStyles  style,
DateTime out 
)
static

Converts the specified string representation of a date and time value to the equivalent DateTime object using the specified format, culture-specific format information and style. The format of the string representation must match the specified format exactly.

Parameters
strTimeThe string representation of a date and time value to convert
formatThe string format
providerThe IFormatProvider object that provides culture-specific format information
styleA bitwise combination of the enumeration values that provides additional information about strTime, about style elements that may be present in strTime, or about the conversion from strTime to a DateTime object
outThe output argument that, if the conversion succeeds, contains the result of conversion
Returns
True if conversion succeeds, otherwise - false

◆ TryParseExact() [2/2]

static ASPOSECPP_SHARED_API bool System::DateTime::TryParseExact ( const String s,
const System::ArrayPtr< System::String > &  formats,
const SharedPtr< IFormatProvider > &  provider,
Globalization::DateTimeStyles  style,
DateTime result 
)
static

Converts the specified string representation of a date and time value to the equivalent DateTime object using the specified formats, culture-specific format information and style. The format of the string representation must match one or more of the specified formats exactly.

Parameters
sThe string representation of a date and time value to convert
formatsThe array of string formats
providerThe IFormatProvider object that provides culture-specific format information
styleA bitwise combination of the enumeration values that provides additional information about s, about style elements that may be present in s, or about the conversion from s to a DateTime object
resultThe output argument that, if the conversion succeeds, contains the result of conversion
Returns
True if conversion succeeds, otherwise - false

◆ Type()

static const TypeInfo& System::DateTime::Type ( )
inlinestatic

Returns a TypeInfo object that contains information about this class.

Member Data Documentation

◆ MaxValue

const DateTime ASPOSECPP_SHARED_API System::DateTime::MaxValue
static

An instance of DateTime class that represents the maximal possible date and time value.

◆ MinValue

const DateTime ASPOSECPP_SHARED_API System::DateTime::MinValue
static

An instance of DateTime class that represents the minimal possible date and time value.