An open API service indexing awesome lists of open source software.

https://github.com/afeiship/next-day-of-year

Javascript calculate the day of the year (1 - 366).
https://github.com/afeiship/next-day-of-year

day next of year

Last synced: 6 months ago
JSON representation

Javascript calculate the day of the year (1 - 366).

Awesome Lists containing this project

README

          

# next-day-of-year
> Javascript calculate the day of the year (1 - 366).

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-day-of-year
```

## usage
```js
import '@jswork/next-day-of-year';

const day1 = new Date('2020-01-01');
const day2 = new Date('2020-02-01');

nx.dayOfYear(day1); // 1
nx.dayOfYear(day2); // 32
```

## resources
- https://stackoverflow.com/questions/8619879/javascript-calculate-the-day-of-the-year-1-366

## license
Code released under [the MIT license](https://github.com/afeiship/next-day-of-year/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-day-of-year
[version-url]: https://npmjs.org/package/@jswork/next-day-of-year

[license-image]: https://img.shields.io/npm/l/@jswork/next-day-of-year
[license-url]: https://github.com/afeiship/next-day-of-year/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-day-of-year
[size-url]: https://github.com/afeiship/next-day-of-year/blob/master/dist/next-day-of-year.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-day-of-year
[download-url]: https://www.npmjs.com/package/@jswork/next-day-of-year