sometime
v0.0.8
Published
create calendar-based dataviz easily
Downloads
29
Readme
work-in-progress
renders html calendars using spacetime date library
npm i sometime
const sometime = require('sometime')
let el = document.querySelector('body')
let cal = sometime.year.weekAlign('2019')
cal.color('june 5th 2019', 'june 8th 2019', 'red')
el.innerHTML = cal.build()
byMonth() renders a typical calendar-representation:
let cal = sometime.quarter.byMonth('june 1 2019')
cal.color('june 5th 2019', 'june 8th 2019', 'red')
el.innerHTML = cal.build()
Output
by default, it returns html strings, but...
output is handled with Jason Miller's htm package, so it can output to a React template, or anything:
const sometime = require('sometime')
const react = require('react')
let c = sometime.year.leftAlign('2019')
c.bind(react.createElement) // anything