0.1.2 • Published 1 year ago

season-date-parser v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Season Date Parser

  • Returns the year, month and days based on the seasons between the 2 dates you enter. In its first version, it calculates only the beginning of the months. The second version will also be added at the end of the months.

Using

const seasonDateParser = require('season-date-parser');

const winter = seasonDateParser.getWinter('2021-01-13','2022-01-13') // Winter
const summer =  seasonDateParser.getSummer('2021-01-13','2022-01-13') // Summer
const spring =  seasonDateParser.getSpring('2021-01-13','2022-01-13') // Spring
const autumn =  seasonDateParser.getAutumn('2021-01-13','2022-01-13') // Autumn

console.log(winter) // { Winter: [ '2021-01-01', '2021-02-01', '2021-12-01', '2022-01-01' ] }
const seasonDateParser = require('season-date-parser');
const ListSeasonDate = seasonDateParser.ListSeasonDate('2021-01-13', '2022-01-13'); 
console.log(ListSeasonDate) 
// {
//   Winter: [ '2021-01-01', '2021-02-01', '2021-12-01', '2022-01-01' ],
//   Summer: [ '2021-06-01', '2021-07-01', '2021-08-01' ],
//   Spring: [ '2021-03-01', '2021-04-01', '2021-05-01' ],
//   Autumn: [ '2021-09-01', '2021-10-01', '2021-11-01' ]
// }

Additional Info

  • It doesn't matter if the season parameter we last entered in the seasonDateParser method is uppercase or lowercase.
0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago