Class ConvertMonthShortcutNumber
- Namespace
- SunamoConverters.Converts
- Assembly
- SunamoConverters.dll
Converts between month numbers (1-12) and English month shortcuts (Jan, Feb, etc.).
public class ConvertMonthShortcutNumber
- Inheritance
-
ConvertMonthShortcutNumber
- Inherited Members
- Extension Methods
Methods
FromShortcut(string)
Converts an English month shortcut to its numeric representation.
public static int FromShortcut(string shortcut)
Parameters
shortcutstringThe month shortcut (e.g., "Jan", "Feb").
Returns
- int
The month number (1-12).
Exceptions
- Exception
Thrown when the shortcut is invalid or cannot be converted.
ToShortcut(int)
Converts a month number to its English shortcut.
public static string? ToShortcut(int number)
Parameters
numberintThe month number (1-12).
Returns
- string
The month shortcut (e.g., "Jan", "Feb"), or null if the number is invalid.