System::DateTimeOffset class
Contents
[
Hide
]DateTimeOffset class
Contains the date and time of day relative to Coordinated Universal Time. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
class DateTimeOffset
Methods
Method | Description |
---|---|
Add(TimeSpan) const | Adds a specified time interval to the DateTimeOffset object. |
AddDays(double) const | Adds a specified number of days to the DateTimeOffset object. |
AddHours(double) const | Adds a specified number of hours to the DateTimeOffset object. |
AddMilliseconds(double) const | Adds a specified number of milliseconds to the DateTimeOffset object. |
AddMinutes(double) const | Adds a specified number of minutes to the DateTimeOffset object. |
AddMonths(int) const | Adds a specified number of months to the DateTimeOffset object. |
AddSeconds(double) const | Adds a specified number of seconds to the DateTimeOffset object. |
AddTicks(int64_t) const | Adds a specified number of ticks to the DateTimeOffset object. |
AddYears(int) const | Adds a specified number of years to the DateTimeOffset object. |
static Compare(const DateTimeOffset&, const DateTimeOffset&) | Compares two DateTimeOffset objects. |
CompareTo(const DateTimeOffset&) const | Compares two DateTimeOffset objects. |
CompareTo(const SharedPtr<Object>&) const | Compares two DateTimeOffset objects. |
DateTimeOffset() | Default constructor. |
DateTimeOffset(DateTime) | Constructor. |
DateTimeOffset(int64_t, TimeSpan) | Constructor. |
DateTimeOffset(DateTime, TimeSpan) | Constructor. |
DateTimeOffset(int, int, int, int, int, int, TimeSpan) | Constructor. |
DateTimeOffset(int, int, int, int, int, int, int, TimeSpan) | Constructor. |
DateTimeOffset(int, int, int, int, int, int, int, const SharedPtr<Globalization::Calendar>&, TimeSpan) | Constructor. |
static Equals(const DateTimeOffset&, const DateTimeOffset&) | Checks if two DateTimeOffset objects represent the same time point. |
Equals(const DateTimeOffset&) const | Checks if two DateTimeOffset objects represents the same time point. |
Equals(const SharedPtr<Object>&) const | Checks if two DateTimeOffset objects represents the same time point. |
EqualsExact(const DateTimeOffset&) const | Checks if two DateTimeOffset objects represents the same time point and has the same offset. |
EqualsExact(const SharedPtr<Object>&) const | Checks if two DateTimeOffset objects represents the same time point and has the same offset. |
static FromFileTime(int64_t) | ConvertWindows file time to date and time with local time offset. |
static FromUnixTimeMilliseconds(int64_t) | Convert Unix-time to DateTimeOffset object. |
static FromUnixTimeSeconds(int64_t) | Convert Unix-time to DateTimeOffset object. |
get_Date() const | Gets date component of the current object. |
get_DateTime() const | Gets DateTime value. |
get_Day() const | Gets day of the month of the current object. |
get_DayOfWeek() const | Gets day of the week of the current object. |
get_DayOfYear() const | Gets day of year of the current object. |
get_Hour() const | Gets hour component of the current object. |
get_LocalDateTime() const | Gets DateTime value that represents the local date and time. |
get_Millisecond() const | Gets millisecond component of the current object. |
get_Minute() const | Gets minute component of the current object. |
get_Month() const | Gets month component of the current object. |
static get_Now() | Gets DateTimeOffset whose date and time are set to the current local-time and whose offset is set to local time’s offset. |
get_Offset() const | Gets offset from UTC. |
get_Second() const | Gets second component of the current object. |
get_Ticks() const | Gets number of ticks of the current object. |
get_TimeOfDay() const | Gets time of day of the current object. |
get_UtcDateTime() const | Gets DateTime value that represents the UTC date and time. |
static get_UtcNow() | Gets DateTimeOffset whose date and time are set to the current UTC-time and whose offset is TimeSpan::Zero. |
get_UtcTicks() const | Gets number of ticks of the current object in UTC time. |
get_Year() const | Gets year component of the current object. |
GetHashCode() const | Gets hash code for the current DateTimeOffset object. |
IsNull() const | |
operator!=(const DateTimeOffset&) const | Determines if the current object and the specified DateTimeOffset object represent distinct date and time values. |
operator!=(std::nullptr_t) const | |
operator+(TimeSpan) const | Returns a new instance of DateTimeOffset 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. |
operator-(TimeSpan) const | Returns a new instance of the DateTimeOffset 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. |
operator-(const DateTimeOffset&) 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. |
operator<(const DateTimeOffset&) const | Determines if the current object represents the date and time value that is earlier than the value represented by the specified DateTimeOffset object. |
operator<(std::nullptr_t) const | |
operator<=(const DateTimeOffset&) 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 DateTimeOffset object. |
operator<=(std::nullptr_t) const | |
operator==(const DateTimeOffset&) const | Determines if the current object and the specified DateTimeOffset object represent the same date and time value. |
operator==(std::nullptr_t) const | |
operator>(const DateTimeOffset&) const | Determines if the current object represents the date and time value that is later than the value represented by the specified DateTimeOffset object. |
operator>(std::nullptr_t) const | |
operator>=(const DateTimeOffset&) 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 DateTimeOffset object. |
operator>=(std::nullptr_t) const | |
static Parse(const String&) | Converts the specified string to DateTimeOffset equivalent. |
static Parse(const String&, const SharedPtr<IFormatProvider>&, Globalization::DateTimeStyles) | Converts the specified string to DateTimeOffset object using the specified format provider and formatting style. |
static ParseExact(const String&, const String&, const SharedPtr<IFormatProvider>&, Globalization::DateTimeStyles) | Converts the specified string to DateTimeOffset object using the specified format, format provider and formatting style. |
static ParseExact(const String&, const ArrayPtr<String>&, const SharedPtr<IFormatProvider>&, Globalization::DateTimeStyles) | Converts the specified string to DateTimeOffset object using the specified formats, format provider and formatting style. |
Subtract(TimeSpan) const | Subtracts a specified time interval from the current object. |
Subtract(const DateTimeOffset&) const | Subtracts a specified DateTimeOffset value from the current object. |
ToFileTime() const | Converts current object to the Windows file time. |
ToLocalTime() const | Converts current object to a object that represents the local time,. |
ToOffset(TimeSpan) const | Replace current object offset by the specified offset. |
ToString(const String&, const SharedPtr<IFormatProvider>&) const | Converts current object to string using the specified format and format provider. |
ToString(const SharedPtr<IFormatProvider>&) const | Converts current object to string using the specified format provider. |
ToString(const String&) const | Converts current object to string using the specified format. |
ToString() const | Converts current object to string. |
ToUniversalTime() const | Converts current object to a object that represents the UTC time,. |
ToUnixTimeMilliseconds() const | Gets milliseconds elapsed from Unix epoch start. |
ToUnixTimeSeconds() const | Gets seconds elapsed from Unix epoch start. |
static TryParse(const String&, DateTimeOffset&) | Tries to converts the specified string to DateTimeOffset object. |
static TryParse(const String&, const SharedPtr<IFormatProvider>&, Globalization::DateTimeStyles, DateTimeOffset&) | Tries to converts the specified string to DateTimeOffset object using the specified format provider and formatting style. |
static TryParseExact(const String&, const ArrayPtr<String>&, const SharedPtr<IFormatProvider>&, Globalization::DateTimeStyles, DateTimeOffset&) | Tries to converts the specified string to DateTimeOffset object using the specified formats, format provider and formatting style. |
static TryParseExact(const String&, const String&, const SharedPtr<IFormatProvider>&, Globalization::DateTimeStyles, DateTimeOffset&) | Tries to converts the specified string to DateTimeOffset object using the specified format, format provider and formatting style. |
static Type() | Returns a TypeInfo object that represent TimeSpan structure. |
Fields
Field | Description |
---|---|
static constexpr MaxOffset | Gets maximum offset in ticks. |
static MaxValue | Gets greatest DateTimeOffset value. |
static constexpr MinOffset | Gets minimum offset in ticks. |
static MinValue | Gets earliest DateTimeOffset value. |
static UnixEpoch | Gets Unix epoch start. |
See Also
- Namespace System
- Library Aspose.PDF for C++