EssentialsDate Class
Namespace | Skybrud.Essentials.Time |
---|---|
Assembly | Skybrud.Essentials.dll |
Visibility | Public |
Interfaces |
IComparable , IComparable<T >
|
Inheritance | Object |
Class representing a date without a time.
public class EssentialsDate : IComparable, IComparable<T> { }
Properties
Type | Name | Summary |
---|---|---|
int | Year |
Gets the year. |
int | Month |
Gets the month. |
int | Day |
Gets the day. |
DayOfWeek | DayOfWeek |
Returns the day-of-week part of this EssentialsDate. The returned value is an integer
between |
int | DayOfYear |
Gets the day-of-year part of this EssentialsDate. The returned value is an integer between |
int | YearAndDay |
Returns a numeric value representing both the year and date. |
bool | IsLeapYear |
Gets whether the year of this EssentialsDate is a leap year. |
bool | IsWeekend |
Gets whether the day of this EssentialsDate is within a weekend. |
bool | IsWeekday |
Gets whether the day of this EssentialsDate is a weekday. |
int | WeekNumber |
Gets the week number the ISO 8601 week of this EssentialsDate. |
int | DaysInMonth |
Gets the amount of days in the month. |
String | DaySuffix |
Gets the English ordinal suffix of the day. |
String | Iso8601 |
Gets a string representation of the instance as specified by the ISO 8601 format. |
bool | IsToday |
Gets whether the date is today. |
EssentialsDate | Today |
Gets an instance of EssentialsDate representing the current day. |
Methods
Returns a new EssentialsDate that adds the specified number of days to the value of this instance. |
CompareTo(EssentialsDate)
(virtual)
Compares the value of this instance to a specified EssentialsDate value and returns an integer that indicates whether this instance is lower than, the same as, or greater than the specified EssentialsDate value. |
Compares the value of this instance to a specified DateTime value and returns an integer that indicates whether this instance is lower than, the same as, or greater than the specified DateTime value. |
Compares the value of this instance to a specified DateTimeOffset value and returns an integer that indicates whether this instance is lower than, the same as, or greater than the specified DateTimeOffset value. |
Compares the value of this instance to a specified EssentialsTime value and returns an integer that indicates whether this instance is lower than, the same as, or greater than the specified EssentialsTime value. |
CompareTo(object)
(virtual)
Compares the value of this instance to a specified object that contains a EssentialsDate value, and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified EssentialsDate value. |
Gets whether this EssentialsDate equals the specified |
Equals(object)
(virtual)
Gets whether this EssentialsDate equals the specified |
Returns the amount of days between Notice: if |
Gets the end of the day, according to Coordinated Universal Time (UTC). |
Gets the end of the day, according to the specified |
Gets the end of the month, according to Coordinated Universal Time (UTC). |
Gets the end of the month, according to the specified |
Gets the end of the week, according to Coordinated Universal Time (UTC). |
Gets the end of the day, according to the specified |
GetHashCode()
(virtual)
Gets the hash code for this EssentialsDate. |
Gets the start of the day, according to Coordinated Universal Time (UTC). |
Gets the start of the day, according to the specified |
Gets the start of the day, according to Coordinated Universal Time (UTC). |
Gets the start of the day, according to the specified |
Gets the start of the week, according to Coordinated Universal Time (UTC). |
Gets the start of the week, according to the specified |
Gets whether the dates represented by two instances of EssentialsDate are equal. |
Gets whether |
Gets whether |
Gets whether |
Gets whether |
Gets whether |
Gets whether |
Gets whether |
Gets whether |
Gets whether the dates represented by two instances of EssentialsDate are different from each other. |
Gets whether |
Gets whether |
Gets whether |
Gets whether |
Gets whether |
Gets whether |
Gets whether |
Gets whether |
Parse(string)
(static)
Converts the string representation of a date to its EssentialsDate equivalent by using the conventions of the current thread culture. |
Parse(string, IFormatProvider)
(static)
Converts the string representation of a date to its EssentialsDate equivalent by using culture-specific format information. |
Converts the string representation of a dat to its EssentialsDate equivalent by using culture-specific format information and a formatting style. |
Converts the specified string representation of a date to its EssentialsDate equivalent using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly. |
Converts the specified string representation of a date to its EssentialsDate equivalent using the specified format, culture-specific format information, and style. The format of the string representation must match the specified format exactly or an exception is thrown. |
Converts the specified string representation of a date to its EssentialsDate equivalent using the specified array of formats, culture-specific format information, and style. The format of the string representation must match at least one of the specified formats exactly or an exception is thrown. |
ToString()
(virtual)
Returns a string representation of the date. |
Converts the value of the current EssentialsDate to its equivalent string representation using the specified |
Converts the value of the current EssentialsDate to its equivalent string representation using the specified |
TryParse(string, out EssentialsDate)
(static)
Tries to convert a specified string representation of a date to its EssentialsTime equivalent, and returns a value that indicates whether the conversion succeeded. |
Tries to convert a specified string representation of a date to its EssentialsTime equivalent, and returns a value that indicates whether the conversion succeeded. |
Converts the specified string representation of a date to its EssentialsDate equivalent using the specified format, culture-specific format information, and style. The format of the string representation must match the specified format exactly. The method returns a value that indicates whether the conversion succeeded. |
Converts the specified string representation of a date to its EssentialsDate equivalent using the specified array of formats, culture-specific format information, and style. The format of the string representation must match at least one of the specified formats exactly. The method returns a value that indicates whether the conversion succeeded. |