Aspose::Cells::Date struct
Contents
[
Hide
]Date struct
Represents a date and time.
struct Date
Methods
| Method | Description |
|---|---|
| AddDays(double days) const | Returns a new Date that adds the specified number of days. |
| AddHours(double hours) const | Returns a new Date that adds the specified number of hours. |
| AddMilliseconds(double ms) const | Returns a new Date that adds the specified number of milliseconds. |
| AddMinutes(double minutes) const | Returns a new Date that adds the specified number of minutes. |
| AddMonths(int32_t months) const | Returns a new Date that adds the specified number of months. |
| AddSeconds(double seconds) const | Returns a new Date that adds the specified number of seconds. |
| AddYears(int32_t years) const | Returns a new Date that adds the specified number of years. |
| DayOfWeek() const | Gets the day of the week for this date. |
| static FromEpochMillisecondsUTC(int64_t ms) | Creates a Date from Unix epoch milliseconds (UTC). |
| static Now() | Gets the current local date and time. |
| static NowUTC() | Gets the current UTC date and time. |
| operator!=(const Date& other) const | Determines whether two Date instances represent different points in time. |
| operator+(const Duration& ts) const | Adds a time interval to the current Date. |
| operator-(const Duration& ts) const | Subtracts a time interval from the current Date. |
| operator-(const Date& other) const | Computes the difference between two Date instances. |
| operator<(const Date& other) const | Determines whether this instance is earlier than another Date. |
| operator<=(const Date& other) const | Determines whether this instance is earlier than or equal to another Date. |
| operator==(const Date& other) const | Determines whether two Date instances represent the same point in time. |
| operator>(const Date& other) const | Determines whether this instance is later than another Date. |
| operator>=(const Date& other) const | Determines whether this instance is later than or equal to another Date. |
| static Parse(const U16String& str) | Parses a string into a Date using default format rules. |
| static Parse(const U16String& str, const U16String& format) | Parses a string into a Date using a specified format. |
| ToEpochMillisecondsUTC() const | Converts this Date to Unix epoch time in milliseconds (UTC). |
| ToLocal() const | Converts this Date to local system time. |
| ToString() const | Converts this Date to its default string representation. |
| ToString(const U16String& format) const | Converts this Date to a string using the specified format. |
| ToUTC() const | Converts this Date to Coordinated Universal Time (UTC). |
Fields
| Field | Description |
|---|---|
| dateKind | Specifies whether the time is local, UTC, or unspecified. Default value is Unspecified. |
| day | Day component (1-31). |
| hour | Hour component (0-23). |
| millisecond | Millisecond component (0-999). |
| minute | Minute component (0-59). |
| month | Month component (1-12). |
| second | Second component (0-59). |
| year | Year component (1-9999). |
See Also
- Namespace Aspose::Cells
- Library Aspose.Cells for C++