# sometime

> create calendar-based dataviz easily

Latest version **0.0.8** (published 2019-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install sometime
pnpm add sometime
yarn add sometime
bun add sometime
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2019-02-26 |
| First published | 2018-12-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 377.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Spencer Kelly |
| Maintainers | spencermountain |

## Links

- npm: https://www.npmjs.com/package/sometime
- Repository: https://github.com/spencermountain/frown
- Homepage: https://github.com/spencermountain/frown#readme
- Issues: https://github.com/spencermountain/frown/issues
- npm.io page: https://npm.io/package/sometime

## Dependencies (5)

- [htm](https://npm.io/package/htm.md) ^2.1.0
- [vhtml](https://npm.io/package/vhtml.md) 2.1.0
- [spacetime](https://npm.io/package/spacetime.md) ^5.3.0
- [spencer-css](https://npm.io/package/spencer-css.md) ^1.0.2
- [spencer-color](https://npm.io/package/spencer-color.md) 0.1.0

## Recent versions

- 0.0.8 (latest) — 2019-02-26
- 0.0.7 — 2019-01-30
- 0.0.6 — 2019-01-09
- 0.0.5 — 2019-01-04
- 0.0.4 — 2019-01-02
- 0.0.3 — 2018-12-28
- 0.0.2 — 2018-12-28
- 0.0.1 — 2018-12-28

## README

<div align="center">
  <div>calendar visualization</div>
  <div>
    <img src="https://cloud.githubusercontent.com/assets/399657/23590290/ede73772-01aa-11e7-8915-181ef21027bc.png" />
  </div>
  <a href="https://npmjs.org/package/sometime">
    <img src="https://img.shields.io/npm/v/sometime.svg?style=flat-square" />
  </a>
  <a href="https://unpkg.com/sometime">
    <img src="https://badge-size.herokuapp.com/spencermountain/sometime/gh-pages/builds/sometime.min.js" />
  </a>
</div>

**work-in-progress**


renders html calendars using [spacetime](https://github.com/spencermountain/spacetime) date library

<h4><a href="https://spencermounta.in/sometime/">demo:</a></h4>

`npm i sometime`

![image](https://user-images.githubusercontent.com/399657/50604609-81a89f00-0e8d-11e9-926d-5ffa4b39f4d3.png)

```js
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:
```js
let cal = sometime.quarter.byMonth('june 1 2019')
cal.color('june 5th 2019', 'june 8th 2019', 'red')
el.innerHTML = cal.build()
```

![image](https://user-images.githubusercontent.com/399657/50697138-682f6080-100f-11e9-8b17-cd80640a86ee.png)

### Output
by default, it returns html strings, but...

output is handled with Jason Miller's [htm](https://github.com/developit/htm) package, so it can output to a React template, or anything:
```js
const sometime = require('sometime')
const react = require('react')

let c = sometime.year.leftAlign('2019')
c.bind(react.createElement) // anything
```



### See also:
* [somehow](https://github.com/spencermountain/somehow) - partner svg dataviz
* [d3-time](https://github.com/d3/d3-time)
MIT

---
_Source: https://npm.io/package/sometime · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
