Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "time/iso-weeks-in-year/docs/types/index.d"

Index

Functions

Functions

Export assignment isoWeeksInYear

  • isoWeeksInYear(value?: number | Date): number
  • Returns the number of ISO weeks in a year according to the Gregorian calendar.

    Notes

    • By default, the function returns the number of ISO weeks in the current year (according to local time). To determine the number of ISO weeks for a particular year, provide either a year or a Date object.

    Parameters

    • Optional value: number | Date

      year or Date object

    Returns number

    number of ISO weeks in a year

    Example

    var num = isoWeeksInYear();
    // returns <number>

    Example

    var num = isoWeeksInYear( 2015 );
    // returns 53

    Example

    var num = isoWeeksInYear( 2017 );
    // returns 52