1.0.3 • Published 6 years ago

@itabashi/calendar v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

npm version

Installation

yarn add @itabashi/calendar

Usage

import calendar from '@itabashi/calendar'
const cal = calendar(2018)(5)

/* result: week array of 2018.5
[
  [ 0, 0, 1, 2, 3, 4, 5 ],
  [ 6, 7, 8, 9, 10, 11, 12 ],
  [ 13, 14, 15, 16, 17, 18, 19 ],
  [ 20, 21, 22, 23, 24, 25, 26 ],
  [ 27, 28, 29, 30, 31, 0, 0 ]
]
*/

// this function is curried, so you can do like this
const 2018calendar = calendar(2018)
const 201805calendar = 2018calendar(5)