codetrix - v1.5.0
    Preparing search index...

    Function subDays

    • Subtracts a specified number of days from a date.

      Parameters

      • date: Date

        The input date.

      • days: number

        The number of days to subtract.

      Returns Date

      A new Date with days subtracted.

      subDays(new Date('2025-07-23'), 3); // → 2025-07-20