Table of Contents

Class ConvertDayShortcutString

Namespace
SunamoConverters.Converts
Assembly
SunamoConverters.dll

Converts between day shortcuts (Mon, Tue, etc.) and numeric representations.

public class ConvertDayShortcutString
Inheritance
ConvertDayShortcutString
Inherited Members
Extension Methods

Methods

ToNumber(string)

Converts a day shortcut (Mon, Tue, etc.) to its numeric representation (0-6).

public static int ToNumber(string text)

Parameters

text string

The day shortcut string.

Returns

int

The day number (0-6), or throws an exception if the shortcut is invalid.

ToString(int)

Converts a day number (0-6) to its English shortcut (Mon, Tue, etc.).

public static string ToString(int day)

Parameters

day int

The day number (0 = Monday, 6 = Sunday).

Returns

string

The day shortcut string, or throws an exception for invalid numbers.