Function JalaliToGregorianDate

  • Converts a Jalali (Persian) date string into its Gregorian equivalent.

    Internally uses the toGregorian function from the jalaali-js library to perform the conversion between the two calendar systems.

    Parameters

    • jalaliDate: string

      The Jalali date string in the format YYYY-MM-DD.

    Returns string

    The corresponding Gregorian date string in the format YYYY-MM-DD.

    const result = JalaliToGregorianDate("1402-07-10");
    console.log(result); // "2023-10-02"