@yookue/ts-lang-utils
    Preparing search index...

    Function addYear

    • Returns the year calculated date with the source date and the specified amount

      Parameters

      • Optionaldate: Date

        the date to inspect

      • Optionalamount: number

        the amount to add, negative number means minus

      Returns undefined | Date

      the year calculated date with the source date and the specified amount

      David Hsing

      addYear(new Date(2023, 8, 30), 1);    // Date(2024, 8, 30)