codetrix - v1.5.0
    Preparing search index...

    Function getWeekNumber

    • Calculates the ISO week number for a given date.

      Parameters

      • date: Date

        The date object to calculate the week number from.

      Returns number

      ISO week number (1–53).

      getWeekNumber(new Date(2025, 6, 23)); // e.g., 30