# isoWeeksInYear
> Determine the number of [ISO weeks][iso-week-date] in a year according to the [Gregorian calendar][gregorian-calendar].
## Usage
```javascript
var isoWeeksInYear = require( '@stdlib/time/iso-weeks-in-year' );
```
#### isoWeeksInYear( \[value] )
Returns the number of [ISO weeks][iso-week-date] in a year according to the [Gregorian calendar][gregorian-calendar].
```javascript
var num = isoWeeksInYear();
// returns
```
By default, the function returns the number of [ISO weeks][iso-week-date] in the current year (according to local time). To determine the number of [ISO weeks][iso-week-date] for a particular year, provide either a year or a [`Date`][date-object] object.
```javascript
var num = isoWeeksInYear( new Date() );
// returns
num = isoWeeksInYear( 2015 );
// returns 53
num = isoWeeksInYear( 2017 );
// returns 52
```
## Examples
```javascript
var isoWeeksInYear = require( '@stdlib/time/iso-weeks-in-year' );
var v;
var i;
for ( i = 0; i < 2021; i++ ) {
v = isoWeeksInYear( i );
console.log( 'The year %d has %d ISO weeks.', i, v );
}
```
* * *
## CLI
### Usage
```text
Usage: iso-weeks-in-year [options] [year]
Options:
-h, --help Print this message.
-V, --version Print the package version.
```
### Examples
```bash
$ iso-weeks-in-year
```
For a specific year,
```bash
$ iso-weeks-in-year 2015
53
```
[iso-week-date]: https://en.wikipedia.org/wiki/ISO_week_date
[gregorian-calendar]: https://en.wikipedia.org/wiki/Gregorian_calendar
[date-object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date