Represents a date with efficient operations.
Inheritance HierarchySystemObject
SystemValueType
Austra.Library.DatesDate
Namespace: Austra.Library.DatesAssembly: Austra.Library (in Austra.Library.dll) Version: 2.7.0+b25929339ea1019e260029cf0ebd18b3a0ce2443
Syntaxpublic readonly struct Date : IEquatable<Date>,
IComparable<Date>, IEqualityOperators<Date, Date, bool>,
IComparisonOperators<Date, Date, bool>, IAdditionOperators<Date, int, Date>,
ISubtractionOperators<Date, int, Date>, ISubtractionOperators<Date, Date, int>,
IIncrementOperators<Date>, IDecrementOperators<Date>, ISpanParsable<Date>,
IParsable<Date>, IFormattable
The Date type exposes the following members.
Constructors
Properties| | Name | Description |
|---|
 | Day | Gets the day component from the date. |
 | DayOfWeek | Gets the day of week, being 0 the code for a Sunday. |
 | Month | Gets the month component from the date. |
  | Today | Gets the current date. |
 | ToInt | Gets the number of days since Jan 1st, 1, as an signed integer. |
 | Year | Gets the year component from the date. |
  | Zero | Gets the zero date. |
Top
Methods| | Name | Description |
|---|
 | AddMonths(Int32) | Adds a number of months to this date. |
  | AddMonths(Int32, Int32, Int32, Int32) | Adds a number of months to a given date. |
 | AddYears | Adds a number of years to this date. |
 | CompareTo | Compares the current date with another. |
  | DaysInMonth | Returns the number of days in the month given by a year and month. |
 | Deconstruct(Int32, Int32) | Extracts the year and month in a single call. |
 | Deconstruct(Int32, Int32, Int32) | Extracts all components from a date in a single call. |
 | Equals(Date) | Compares this date to another date. |
 | Equals(Object) | Compares this date to another object for equality. (Overrides ValueTypeEquals(Object)) |
  | FromYear | Creates a Date instance for Jan 1st of the given year. |
 | GetHashCode | Returns a hash code for this date. (Overrides ValueTypeGetHashCode) |
 | GetType | Gets the Type of the current instance. (Inherited from Object) |
 | IsLeap | Checks if the date belongs to a leap year. |
  | IsLeapYear | Checks if a given year is a leap year. |
  | Max | Gets the maximum of two dates. |
  | Min | Gets the minimum of two dates. |
  | Parse(ReadOnlySpanChar, IFormatProvider) | Parses a span of characters into a value. |
  | Parse(String, IFormatProvider) | Parses a string into a value. |
 | RollEOM | Rolls this date up to the end of month. |
 | RollIMM | Rolls this date up to the third Wednesday of the month. |
 | ToString | Gets a textual representation of this date. (Overrides ValueTypeToString) |
 | ToString(String, IFormatProvider) | Gets a textual representation of this date. |
 | TruncateDay | Change the day of a date to the first day in the month. |
  | TryParse(ReadOnlySpanChar, IFormatProvider, Date) | Tries to parse a span of characters into a value. |
  | TryParse(String, IFormatProvider, Date) | Tries to parse a string into a value. |
Top
Operators
Fields
See Also