@itabashi/calendar
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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)

Readme

Keywords

none

Package Sidebar

Install

npm i @itabashi/calendar

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

4.94 kB

Total Files

9

Last publish

Collaborators

  • itabashi