|
DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
|
Represents a point in time, typically expressed as a date and time of day, relative to Coordinated Universal Time (UTC). More...
#include <DateTimeOffset.h>
Public Member Functions | |
| DateTimeOffset () | |
| Initializes a new instance of DateTimeOffset to 0 ticks. | |
| DateTimeOffset (int64_t ticks) | |
| Initializes a new instance of DateTimeOffset with the specified number of ticks. | |
| int64_t | GetTicks () const |
| Gets the number of ticks that represent the date and time of the current DateTimeOffset object in UTC. | |
| bool | operator!= (const DateTimeOffset &other) const |
| Indicates whether two DateTimeOffset instances represent different points in time. | |
| TimeSpan | operator- (const DateTimeOffset &other) const |
| Subtracts a DateTimeOffset from this instance to calculate the elapsed TimeSpan. | |
| bool | operator< (const DateTimeOffset &other) const |
| Indicates whether one DateTimeOffset occurs earlier than another. | |
| bool | operator<= (const DateTimeOffset &other) const |
| Indicates whether one DateTimeOffset occurs earlier than or at the same time as another. | |
| bool | operator== (const DateTimeOffset &other) const |
| Indicates whether two DateTimeOffset instances represent the same point in time. | |
| bool | operator> (const DateTimeOffset &other) const |
| Indicates whether one DateTimeOffset occurs later than another. | |
| bool | operator>= (const DateTimeOffset &other) const |
| Indicates whether one DateTimeOffset occurs later than or at the same time as another. | |
| String | ToString () const |
| Converts the value of the current DateTimeOffset object to its equivalent string representation. | |
| String | ToString (const String &sFormat) const |
| Converts the value of the current DateTimeOffset object to its equivalent string representation using the specified format. | |
| Public Member Functions inherited from DotNetDupe::System::Object | |
| virtual | ~Object ()=default |
| Virtual destructor ensuring polymorphic cleanup. | |
| virtual bool | Equals (const Object &obj) const |
| Determines whether the specified Object is equal to the current Object. | |
| virtual int | GetHashCode () const |
| Serves as the default hash function. | |
| bool | operator== (const Object &obj) const |
| Determines reference equality between two objects. | |
| char * | ToStringA () const |
| Returns narrow-character string representation. | |
| wchar_t * | ToStringW () const |
| Returns wide-character string representation. | |
Static Public Member Functions | |
| static DateTimeOffset | Now () |
| Gets a DateTimeOffset object that is set to the current date and time on the current computer, with the offset set to the local time's offset from UTC. | |
| static DateTimeOffset | UtcNow () |
| Gets a DateTimeOffset object whose date and time are set to the current Coordinated Universal Time (UTC). | |
| Static Public Member Functions inherited from DotNetDupe::System::Object | |
| static bool | Equals (const Object &obj1, const Object &obj2) |
| Static helper determining whether two object instances are equal. | |
Represents a point in time, typically expressed as a date and time of day, relative to Coordinated Universal Time (UTC).
Definition at line 22 of file DateTimeOffset.h.
|
inline |
Initializes a new instance of DateTimeOffset to 0 ticks.
Definition at line 25 of file DateTimeOffset.h.
Referenced by DotNetDupe::System::Diagnostics::ExtractLevelAndTime(), Now(), operator!=(), operator-(), operator<(), operator<=(), operator==(), operator>(), operator>=(), DotNetDupe::System::TimeZone::ToLocalTime(), DotNetDupe::System::TimeZone::ToUniversalTime(), and UtcNow().
|
inline |
Initializes a new instance of DateTimeOffset with the specified number of ticks.
| ticks | A date and time expressed in the number of 100-nanosecond units. |
Definition at line 29 of file DateTimeOffset.h.
|
inline |
Gets the number of ticks that represent the date and time of the current DateTimeOffset object in UTC.
Definition at line 33 of file DateTimeOffset.h.
Referenced by DotNetDupe::System::TimeZone::ToLocalTime(), and DotNetDupe::System::TimeZone::ToUniversalTime().
|
static |
Gets a DateTimeOffset object that is set to the current date and time on the current computer, with the offset set to the local time's offset from UTC.
Query current local time from the configured system time provider.
Definition at line 10 of file DateTimeOffset.cpp.
References DateTimeOffset(), DotNetDupe::System::TimeProvider::GetLocalNow(), and DotNetDupe::System::TimeProvider::GetSystem().
|
inline |
Indicates whether two DateTimeOffset instances represent different points in time.
Definition at line 61 of file DateTimeOffset.h.
References DateTimeOffset().
|
inline |
Subtracts a DateTimeOffset from this instance to calculate the elapsed TimeSpan.
Definition at line 53 of file DateTimeOffset.h.
References DateTimeOffset(), and DotNetDupe::System::TimeSpan::TimeSpan().
|
inline |
Indicates whether one DateTimeOffset occurs earlier than another.
Definition at line 64 of file DateTimeOffset.h.
References DateTimeOffset().
|
inline |
Indicates whether one DateTimeOffset occurs earlier than or at the same time as another.
Definition at line 67 of file DateTimeOffset.h.
References DateTimeOffset().
|
inline |
Indicates whether two DateTimeOffset instances represent the same point in time.
Definition at line 58 of file DateTimeOffset.h.
References DateTimeOffset().
|
inline |
Indicates whether one DateTimeOffset occurs later than another.
Definition at line 70 of file DateTimeOffset.h.
References DateTimeOffset().
|
inline |
Indicates whether one DateTimeOffset occurs later than or at the same time as another.
Definition at line 73 of file DateTimeOffset.h.
References DateTimeOffset().
| String DotNetDupe::System::DateTimeOffset::ToString | ( | ) | const |
Converts the value of the current DateTimeOffset object to its equivalent string representation.
Format using ISO 8601 extended standard pattern.
Definition at line 20 of file DateTimeOffset.cpp.
References ToString().
Referenced by ToString().
Converts the value of the current DateTimeOffset object to its equivalent string representation using the specified format.
| sFormat | A format specification string. |
Convert ticks to total seconds offset by the Unix epoch (1970-01-01).
Convert seconds to platform calendar breakdown.
Format timestamp into fixed-width buffer and return String.
Definition at line 25 of file DateTimeOffset.cpp.
References DotNetDupe::System::String::String().
|
static |
Gets a DateTimeOffset object whose date and time are set to the current Coordinated Universal Time (UTC).
Query current UTC time from the configured system time provider.
Definition at line 15 of file DateTimeOffset.cpp.
References DateTimeOffset(), DotNetDupe::System::TimeProvider::GetSystem(), and DotNetDupe::System::TimeProvider::GetUtcNow().