Class ConvertMonthNumberStringNotTranslateAble
- Namespace
- SunamoConverters.Converts
- Assembly
- SunamoConverters.dll
Converts between English month names and numeric representations (1-12).
public class ConvertMonthNumberStringNotTranslateAble
- Inheritance
-
ConvertMonthNumberStringNotTranslateAble
- Inherited Members
- Extension Methods
Methods
ToNumber(string)
Converts a full English month name to its numeric representation (1-12).
public static int ToNumber(string text)
Parameters
textstringThe full English name of the month (e.g., "January").
Returns
- int
The numeric representation of the month (1-12).
Exceptions
- Exception
Thrown when the month name is not recognized.
ToString(int)
Converts a month number (1-12) to its full English name.
public static string? ToString(int number)
Parameters
numberintThe month number (1-12).
Returns
- string
The full English name of the month, or null if the number is invalid.