• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Struct WeekDay

A weekday with an optional ordinal, used in BYDAY recurrence rule parts (RFC 5545 §3.3.10). For example, MO is Monday with no ordinal; 1MO is the first Monday; -1FR is the last Friday.

Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
Namespace: DRIT.Mail.Rfc.ICal
Assembly: DRIT.Mail.dll
Syntax
public readonly struct WeekDay

Constructors

View Source

WeekDay(DayOfWeek, int?)

Initializes a new instance of the WeekDay struct.

Declaration
public WeekDay(DayOfWeek day, int? ordinal)
Parameters
Type Name Description
DayOfWeek day

The day of week.

int? ordinal

The ordinal (1-based) or null for all occurrences.

Properties

View Source

Day

Gets the day of week.

Declaration
public DayOfWeek Day { get; }
Property Value
Type Description
DayOfWeek
View Source

Ordinal

Gets the ordinal (1-based, positive for first/second/...; negative for last/ second-to-last/...), or null to match every occurrence of the weekday.

Declaration
public int? Ordinal { get; }
Property Value
Type Description
int?

Methods

View Source

FormatDayName(DayOfWeek)

Formats a DayOfWeek as a two-letter abbreviation.

Declaration
public static string FormatDayName(DayOfWeek day)
Parameters
Type Name Description
DayOfWeek day

Specifies the day value.

Returns
Type Description
string
View Source

Parse(string)

Parses a BYDAY weekday token such as MO, 1MO, or -1FR.

Declaration
public static WeekDay Parse(string text)
Parameters
Type Name Description
string text

Specifies the text value.

Returns
Type Description
WeekDay
View Source

ParseDayName(string)

Parses a two-letter day-of-week abbreviation (MO, TU, WE, TH, FR, SA, SU).

Declaration
public static DayOfWeek ParseDayName(string name)
Parameters
Type Name Description
string name

Specifies the name value.

Returns
Type Description
DayOfWeek
View Source

ToString()

Formats this weekday for iCalendar serialization (e.g. MO, 1MO, -1FR).

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
ValueType.ToString()
  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX