Function getJalaliMonthName

  • Returns the Persian (Jalali) month name for a given month number or string.

    Parameters

    • month: string | number

      The month as a number (1-12) or string representation.

    Returns string

    The Jalali month name if valid, otherwise returns 'wrong month'.

    getJalaliMonthName(1); // returns 'Farvardin'
    getJalaliMonthName('2'); // returns 'Ordibehesht'
    getJalaliMonthName(13); // returns 'wrong month'