Weekday Class |
new Weekday(2, Weekday.Monday) // represents second Monday
new Weekday(-1, Weekday.Friday) // represents last Friday
The Weekday type exposes the following members.
| Name | Description | |
|---|---|---|
| Name | Two letter name of the day (MO, TU, WE, TH, FR, SA, SU) | |
| Offset | Day of the week offset. 1 is first, 2 is second, -1 means last, -2 means second from the last and so on. |
| Name | Description | |
|---|---|---|
| Equals(Object) |
Determines whether the specified object is equal to the current object.
Names are compared case insensitive.
(Overrides ObjectEquals(Object)) | |
| Equals(Weekday) | Determines whether the specified Weekday object is equal to the current one. Names are compared case insensitive. | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| GetDayOfWeek | Gets DayOfWeek represented by this instances. | |
| GetHashCode |
Serves as a hash function for a particular type.
(Overrides ObjectGetHashCode) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| ToString |
Returns this object rendered as string.
(Overrides ObjectToString) |
| Name | Description | |
|---|---|---|
| Equality(Weekday, Weekday) | Determines whether two Weekday objects are equal. | |
| Inequality(Weekday, Weekday) | Determines whether two Weekday objects are not equal. |
| Name | Description | |
|---|---|---|
| FirstFriday | First Friday. | |
| FirstMonday | First Monday. | |
| FirstSaturday | Last Saturday. | |
| FirstSunday | First Sunday. | |
| FirstThursday | First Thursday. | |
| FirstTuesday | First Tuesday. | |
| FirstWednesday | First Wednesday. | |
| Friday | Friday. | |
| LastFriday | Last Friday. | |
| LastMonday | Last Monday. | |
| LastSaturday | Last Saturday. | |
| LastSunday | Last Sunday. | |
| LastThursday | Last Thursday. | |
| LastTuesday | Last Tuesday. | |
| LastWednesday | Last Wednesday. | |
| Monday | Monday. | |
| Saturday | Saturday. | |
| Sunday | Sunday. | |
| Thursday | Thursday. | |
| Tuesday | Tuesday. | |
| Wednesday | Wednesday. |