calendar-fp
v1.0.3
Published
Framework agnostic calendar helper functions
Downloads
4
Readme
Calendar FP
Framework agnostic calendar helper functions.
Features
- All functional style coding
- Small codebase
- It uses
date-fns
library for date manipulations.
Docs: https://calendar-fp.github.io/calendar-fp/globals.html
Example
import {
getAllDates,
getAllDatesMatrix,
getDays,
getMonthAndYear,
getNextMonth,
getPrevMonth
} from 'calendar-fp';
console.log(getAllDates(new Date(2021, 0, 1)));
// [new Date(2020, 11, 27), new Date(2020, 11, 28), new Date(2020, 11, 29), ...]
console.log(getDays());
// ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
Code Sandbox: https://codesandbox.io/s/bold-dawn-h2ohv?file=/src/index.js
Implementations
All are work in progress
Vanilla JS: https://github.com/calendar-fp/calendar-fp-vanilla-js
React: https://github.com/calendar-fp/calendar-fp-react
Vue: https://github.com/calendar-fp/calendar-fp-vue