Date Class |
Namespace: Algs4Net
public class Date : IComparable<Date>
The Date type exposes the following members.
Name | Description | |
---|---|---|
Date(String) |
Initializes new date specified as a string in form MM/DD/YYYY. | |
Date(Int32, Int32, Int32) | Initializes a new date from the month, day, and year. |
Name | Description | |
---|---|---|
CompareTo |
Compares two dates chronologically. | |
Equals |
Compares this date to the specified date. (Overrides ObjectEquals(Object).) | |
GetHashCode |
Returns an integer hash code for this date. (Overrides ObjectGetHashCode.) | |
IsAfter |
Compares two dates chronologically. | |
IsBefore |
Compares two dates chronologically. | |
MainTest |
Demo test the Date data type. | |
Next |
Returns the next date in the calendar. | |
ToString |
Returns a string representation of this date. (Overrides ObjectToString.) |
For additional documentation, see Section 1.2 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
This class is a C# port from the original Java class Date implementation by the respective authors.