Click or drag to resize

Day Methods

The Day type exposes the following members.

Methods
  NameDescription
Public methodAfter(Day)
Returns true if this Day is chronologically after the specified comparison Day; false otherwise.
Public methodAsRange
Returns a DayRange covering this Day only.
Public methodBefore(Day)
Returns true if this Day is chronologically before the specified comparison Day; false otherwise.
Public methodCompareTo(Day)
Compares two Day instances for chronological ordering.
Public methodDaysAfter(Day)
Returns the number of days that this Day is after the specified comparison Day, which will be negative if this Day comes first chronologically.
Public methodDaysBefore(Day)
Returns the number of days that this Day is before the specified comparison Day, which will be negative if comparisonDay comes first chronologically.
Public methodEquals(Object)
Returns true if obj is a Day that represents the same date as this Day; false otherwise.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Day)
Returns true if other represents the same date as this Day; false otherwise.
Public methodStatic memberFromDateTime(DateTime)
Returns the Day represented by the specified DateTime.
Public methodStatic memberFromString(String)
Parses a string date in ISO YYYY-MM-DD format (the format used by XML schema's date type), or YYYYMMDD format.
Public methodGetHashCode
Overridden to ensure consistency with Equals.
(Overrides ValueTypeGetHashCode.)
Public methodMinusDays(Int32)
Returns the Day that comes the specified numberOfDays before this Day in the calendar.
Public methodMinusMonths(Int32)
Returns the Day that comes the specified numberOfMonths before this Day in the calendar.
Public methodMinusWeeks(Int32)
Returns the Day that comes the specified numberOfWeeks before this Day in the calendar.
Public methodMinusYears(Int32)
Returns the Day that comes the specified numberOfYears before this Day in the calendar.
Public methodNext
Returns the Day that comes immediately after this Day in the calendar. Will happily cross the borders between months and years.
Public methodPlusDays(Int32)
Returns the Day that comes the specified numberOfDays after this Day in the calendar.
Public methodPlusMonths(Int32)
Returns the Day that comes the specified numberOfMonths after this Day in the calendar.
Public methodPlusWeeks(Int32)
Returns the Day that comes the specified numberOfWeeks after this Day in the calendar.
Public methodPlusYears(Int32)
Returns the Day that comes the specified numberOfYears after this Day in the calendar.
Public methodPrevious
Returns the Day that comes immediately before this Day in the calendar. Will happily cross the borders between months and years.
Public methodTo(Day)
Returns the DayRange covering (inclusively) the days between this Day and firstOrLastDayInRange (which can be before, after, or equal to this Day).
Public methodTo(Int32, Int32, Int32)
Returns the DayRange covering (inclusively) the days between this Day and the Day represented by the specified parameters (which can be before, after, or equal to this Day).
Public methodStatic memberTodayInSystemTimeZone
Returns the Day representing the current date in the system time-zone.
Public methodStatic memberTodayInUtc
Returns the Day representing the current date in the UTC time-zone.
Public methodToNumericString
Returns a non-null, non-empty string representation of this Day in YYYYMMDD format.
Public methodToString
Returns a non-null, non-empty string representation of this Day in YYYY-MM-DD format.
(Overrides ValueTypeToString.)
Public methodStatic memberTryFromString(String, Day)
Tries to parse a string date in ISO YYYY-MM-DD format (the format used by XML schema's date type), or YYYYMMDD format. Returns true if it succeeds.
Top
See Also