codetrix - v1.5.0
    Preparing search index...

    Function isBefore

    • Checks if the first date is before the second date.

      Parameters

      • date1: Date

        The first date.

      • date2: Date

        The second date to compare.

      Returns boolean

      true if date1 is before date2.

      isBefore(new Date('2025-01-01'), new Date('2025-01-02')); // true