193 return TimeSpan(m_nTicks - other.m_nTicks);
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Base object class for DotNetDupe mirroring .NET System.Object.
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
Represents a time interval.
Represents an instant in time, typically expressed as a date and time of day.
int GetSecond() const
Gets the seconds component of the date represented by this instance.
static bool IsLeapYear(int year)
Returns an indication whether the specified year is a leap year.
DateTime Add(TimeSpan value) const
Returns a new DateTime that adds the value of the specified TimeSpan.
static DateTime ParseExact(const String &s, const String &format)
Converts the string representation of a date and time to its DateTime equivalent using specified form...
int64_t GetTicks() const
Gets the number of ticks that represent the date and time of this instance.
bool operator<(const DateTime &other) const
DateTime operator+(const TimeSpan &t) const
Adds a TimeSpan to this instance.
DateTime AddSeconds(double value) const
Returns a new DateTime that adds the specified number of seconds.
DateTime AddMonths(int months) const
Returns a new DateTime that adds the specified number of months.
DateTime operator-(const TimeSpan &t) const
Subtracts a TimeSpan from this instance.
DateTime AddHours(double value) const
Returns a new DateTime that adds the specified number of hours.
static DateTime Now()
Gets a DateTime object set to the current date and time on this computer, expressed as local time.
DateTime ToUniversalTime() const
Converts the value of the current DateTime object to Coordinated Universal Time (UTC).
int GetMonth() const
Gets the month component of the date represented by this instance.
static bool TryParse(const String &s, DateTime &result)
Converts the string representation of a date and time to its DateTime equivalent and returns success ...
int GetDayOfWeek() const
Gets the day of the week represented by this instance.
DateTime AddMilliseconds(double value) const
Returns a new DateTime that adds the specified number of milliseconds.
DateTime AddYears(int value) const
Returns a new DateTime that adds the specified number of years.
int GetHour() const
Gets the hour component of the date represented by this instance.
DateTimeKind GetKind() const
Gets a value that indicates whether the time is local, UTC, or neither.
DateTime()
Initializes a new instance of DateTime to 0 ticks (0001-01-01 00:00:00) with Unspecified kind.
bool operator<=(const DateTime &other) const
TimeSpan operator-(const DateTime &other) const
Subtracts a DateTime from this instance to calculate the elapsed TimeSpan.
bool operator!=(const DateTime &other) const
int GetYear() const
Gets the year component of the date represented by this instance.
DateTime(int64_t nTicks)
Initializes a new instance of DateTime with a specified number of ticks.
static DateTime Parse(const String &s)
Converts the string representation of a date and time to its DateTime equivalent.
String ToString() const
Converts the value of the current DateTime object to its equivalent string representation.
int GetMinute() const
Gets the minute component of the date represented by this instance.
DateTime(int64_t nTicks, DateTimeKind kind)
Initializes a new instance of DateTime with specified ticks and DateTimeKind.
DateTime AddTicks(int64_t value) const
Returns a new DateTime that adds the specified number of ticks.
DateTime ToLocalTime() const
Converts the value of the current DateTime object to local time.
int GetDayOfYear() const
Gets the day of the year represented by this instance.
bool operator>(const DateTime &other) const
TimeSpan GetTimeOfDay() const
Gets the time of day for this instance.
bool operator>=(const DateTime &other) const
static DateTime UtcNow()
Gets a DateTime object set to the current date and time on this computer, expressed as UTC.
int GetDay() const
Gets the day of the month represented by this instance.
int GetMillisecond() const
Gets the milliseconds component of the date represented by this instance.
DateTime GetDate() const
Gets the date component of this instance with the time set to 00:00:00.
static DateTime Today()
Gets the current date with the time component set to 00:00:00.
static int DaysInMonth(int year, int month)
Returns the number of days in the specified month and year.
bool operator==(const DateTime &other) const
DateTime AddMinutes(double value) const
Returns a new DateTime that adds the specified number of minutes.
static bool TryParseExact(const String &s, const String &format, DateTime &result)
Converts the string representation of a date and time to its DateTime equivalent using format and ret...
DateTime AddDays(double value) const
Returns a new DateTime that adds the specified number of days.
Supports all classes in the DotNetDupe class hierarchy.
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Represents a time interval (duration of time or elapsed time) measured as a positive or negative numb...
TimeSpan()
Initializes a new instance of TimeSpan to zero duration.
int64_t GetTicks() const
Gets the number of ticks that represent the value of the current TimeSpan structure.
DateTimeKind
Specifies whether a DateTime object represents local time, UTC, or is unspecified.
@ Utc
The time represented is UTC.
@ Local
The time represented is local time.
@ Unspecified
The time represented is not specified as either local time or UTC.