EssentialsDateTime Class
| Namespace | Skybrud.Essentials.Time |
|---|---|
| Assembly | Skybrud.Essentials.dll |
| Visibility | Public |
| Interfaces |
IComparable , IComparable<T>, IComparable<T>
|
| Inheritance | Object |
Class wrapping an instance of EssentialsDateTime.DateTime (as an alternative to using Nullable<T>).
[Obsolete("Use EssentialsTime class instead.")]
public class EssentialsDateTime : IComparable, IComparable<T>, IComparable<T> { }
Properties
| Type | Name | Summary |
|---|---|---|
| EssentialsDateTime | Now |
Gets a EssentialsDateTime object that is set to the current date and time on this computer, expressed as the local time. |
| long | CurrentUnixTimestamp |
Gets the current UNIX timestamp (amount of seconds since the start of the Unix Epoch). |
| EssentialsDateTime | Zero |
Gets an instance of EssentialsDateTime representing the start of the Unix Epoch
(AKA |
| EssentialsDateTime | Today |
Gets the current date. |
| EssentialsDateTime | UtcNow |
Gets a EssentialsDateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC). |
| DateTime | DateTime |
Gets the wrapped EssentialsDateTime.DateTime. |
| int | Day |
Returns the day-of-month part of this EssentialsDateTime. The returned value is an integer
between |
| DayOfWeek | DayOfWeek |
Returns the day-of-week part of this EssentialsDateTime. The returned value is an integer
between |
| int | DayOfYear |
Gets the day-of-year part of this EssentialsDateTime. The returned value is an integer
between |
| int | Hour |
Gets the hour part of this EssentialsDateTime. The returned value is an integer between
|
| DateTimeKind | Kind |
Gets the kind of the underlying EssentialsDateTime.DateTime. |
| int | Millisecond |
Gets the millisecond part of this EssentialsDateTime. The returned value is an integer between
|
| int | Minute |
Gets the minute part of this EssentialsDateTime. The returned value is an integer between
|
| int | Month |
Gets the month part of this EssentialsDateTime. The returned value is an integer between
|
| int | Second |
Gets the second part of this EssentialsDateTime. The returned value is an integer between
|
| long | Ticks |
Gets the tick count for this EssentialsDateTime. The returned value is the number of
100-nanosecond intervals that have elapsed since |
| TimeSpan | TimeOfDay |
Gets the time-of-day part of this EssentialsDateTime. The returned value is a TimeSpan that indicates the time elapsed since midnight. |
| int | Year |
Returns the year part of this EssentialsDateTime. The returned value is an integer between
|
| long | UnixTimestamp |
Gets the UNIX timestamp (amount of seconds since the start of the Unix Epoch) for this EssentialsDateTime. |
| bool | IsLeapYear |
Gets whether the year of this EssentialsDateTime is a leap year. |
| bool | IsWeekend |
Gets whether the day of this EssentialsDateTime is within a weekend. |
| bool | IsWeekday |
Gets whether the day of this EssentialsDateTime is a weekday. |
| int | WeekNumber |
Gets the week number the ISO8601 week of this EssentialsDateTime. |
| EssentialsDateWeek | Week |
Gets a reference to an instance of EssentialsDateWeek representing the ISO 8601 week of this EssentialsDateTime. |
| int | DaysInMonth |
Gets the amount of days in the month. |
| bool | IsZero |
Gets whether the Unix timestamp of this EssentialsDateTime is |
| bool | IsNegative |
Gets whether the Unix timestamp of this EssentialsDateTime is less than |
| bool | IsPositive |
Gets whether the Unix timestamp of this EssentialsDateTime is greater than |
| String | Iso8601 |
Gets a string representation of the instance as specified by the ISO 8601 format. |
| String | ToIso8601 |
Gets a string representation of the instance as specified by the ISO 8601 format. |
| String | Rfc822 |
Gets a string representation of the instance as specified by the RFC 822 format. |
| String | Rfc2822 |
Gets a string representation of the instance as specified by the RFC 2822 format. |
| String | ToRfc2822 |
Gets a string representation of the instance as specified by the RFC 2822 format. |
Methods
|
Returns a new EssentialsDateTime that adds the value of the specified TimeSpan to the value of this instance. |
|
Returns a new EssentialsDateTime that adds the specified number of days to the value of this instance. |
|
Returns a new EssentialsDateTime that adds the specified number of hours to the value of this instance. |
|
Returns a new EssentialsDateTime that adds the specified number of milliseconds to the value of this instance. |
|
Returns a new EssentialsDateTime that adds the specified number of minutes to the value of this instance. |
|
Returns a new EssentialsDateTime that adds the specified number of months to the value of this instance. |
|
Returns a new EssentialsDateTime that adds the specified number of seconds to the value of this instance. |
|
Returns a new EssentialsDateTime that adds the specified number of ticks to the value of this instance. |
|
Returns a new EssentialsDateTime that adds the specified number of years to the value of this instance. |
|
CompareTo(DateTime)
(virtual)
Compares the value of this instance to a specified EssentialsDateTime.DateTime value and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified EssentialsDateTime.DateTime value. |
|
CompareTo(EssentialsDateTime)
(virtual)
Compares the value of this instance to a specified EssentialsDateTime value and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified EssentialsDateTime value. |
|
CompareTo(object)
(virtual)
Compares the value of this instance to a specified object that contains a specified EssentialsDateTime.DateTime value, and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified EssentialsDateTime.DateTime value. |
|
Equals(object)
(virtual)
Gets whether this EssentialsDateTime equals the specified |
|
FromIso8601(string)
(static)
Convert the specified ISO 8601 string to an instance of EssentialsDateTime. |
|
FromIso8601Week(int, int)
(static)
Gets an instance of EssentialsDateTime representing the start of the specified
ISO 8601 |
|
FromRfc2822(string)
(static)
Convert the specified RFC 2822 string to an instance of EssentialsDateTime. |
|
FromRfc822(string)
(static)
Convert the specified RFC 822 string to an instance of EssentialsDateTime. |
|
FromUnixTimestamp(int)
(static)
Initialize a new instance from the specified UNIX timestamp. |
|
FromUnixTimestamp(long)
(static)
Initialize a new instance from the specified UNIX timestamp. |
|
FromUnixTimestamp(double)
(static)
Initialize a new instance from the specified UNIX timestamp. |
|
Converts the value of this instance to all the string representations supported by the standard date and time format specifiers. |
|
Converts the value of this instance to all the string representations supported by the standard date and time format specifiers and the specified culture-specific formatting information. |
|
Converts the value of this instance to all the string representations supported by the specified standard date and time format specifier. |
|
Converts the value of this instance to all the string representations supported by the specified standard date and time format specifier and culture-specific formatting information. |
|
Gets the English name of the day. |
|
Gets the first day of the month based on this EssentialsDateTime. |
|
Gets the first day of the week based on this EssentialsDateTime. Monday is considered the first day of the week. |
|
Gets the first day of the week based on this EssentialsDateTime and
|
|
GetHashCode()
(virtual)
Gets the hash code for this EssentialsDateTime. |
|
Gets the last day of the month based on this EssentialsDateTime. |
|
Gets the last day of the week based on this EssentialsDateTime. Monday is considered the first day of the week. |
|
Gets the last day of the week based on this EssentialsDateTime and
|
|
Gets the last day of the week based on this EssentialsDateTime and
|
|
Gets the name of the day according to |
|
Gets the name of the day according to |
|
Gets the name of the month according to current culture. |
|
Gets the name of the month according to current culture. |
|
Gets the name of the month according to |
|
Gets the English name of the month. |
|
Indicates whether the internal instance of EssentialsDateTime is within the daylight saving time range for the current time zone. |
|
Adds |
|
Gets whether the timestamps represented by two instances of EssentialsDateTime are equal. |
|
Gets whether |
|
Gets whether |
|
op_Implicit(DateTime)
(static)
HEST Initializes a new instance of EssentialsDateTime from the specified
|
|
op_Implicit(long)
(static)
Initializes a new instance of EssentialsDateTime from the specified
|
|
op_Implicit(double)
(static)
Initializes a new instance of EssentialsDateTime from the specified
|
|
Gets whether the timestamps represented by two instances of EssentialsDateTime are different from each other. |
|
Gets whether |
|
Gets whether |
|
Subtracts |
|
Subtracts two instances of EssentialsDateTime. |
|
Parse(string)
(static)
Parses the specified string into an instance of EssentialsDateTime. |
|
Subtracts the specified date and time from this instance. |
|
Subtracts the specified date and time from this instance. |
|
Subtracts the specified duration from this instance. |
|
Serializes the internal DateTime object to a 64-bit binary value that subsequently can be used to recreate the DateTime object. |
|
Converts the value of the internal DateTime object to a Windows file time. |
|
Converts the value of the internal DateTime object to a Windows file time. |
|
Converts the value of the internal DateTime object to local time. |
|
Converts the value of the internal DateTime object to its equivalent long date string representation. |
|
Converts the value of the internal DateTime object to its equivalent long time string representation. |
|
Converts the value of the internal DateTime object to the equivalent OLE Automation date. |
|
Converts the value of the internal DateTime object to its equivalent short date string representation. |
|
Converts the value of the internal DateTime object to its equivalent short time string representation. |
|
ToString()
(virtual)
Converts the value of the current EssentialsDateTime to its equivalent string representation. |
|
Converts the value of the current EssentialsDateTime to its equivalent string representation
using the specified |
|
Converts the value of the current EssentialsDateTime to its equivalent string representation
using the specified |
|
Converts the value of the current EssentialsDateTime to its equivalent string representation
using the specified |
|
Converts the value of the internal DateTime object to Coordinated Universal Time (UTC). |
|
Converts the specified string representation of a date and time to its EssentialsDateTime equivalent and returns a value that indicates whether the conversion succeeded. |
|
Converts the specified string representation of a date and time to its EssentialsDateTime equivalent using the specified culture-specific format information and formatting style, and returns a value that indicates whether the conversion succeeded. |