sometime

0.0.8 • Public • Published
calendar visualization

work-in-progress

renders html calendars using spacetime date library

demo:

npm i sometime

image

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()

image

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

See also:

Readme

Keywords

none

Package Sidebar

Install

npm i sometime

Weekly Downloads

0

Version

0.0.8

License

MIT

Unpacked Size

387 kB

Total Files

20

Last publish

Collaborators

  • spencermountain