# human-time

> show seconds in a human-readable form

Latest version **0.0.2** (published 2018-12-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install human-time
pnpm add human-time
yarn add human-time
bun add human-time
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2018-12-27 |
| First published | 2015-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Dave Eddy |
| Maintainers | bahamas10 |
| Keywords | human, relative, date, ago, time |

## Links

- npm: https://www.npmjs.com/package/human-time
- Repository: https://github.com/bahamas10/human
- Issues: https://github.com/bahamas10/human/issues
- npm.io page: https://npm.io/package/human-time

## Recent versions

- 0.0.2 (latest) — 2018-12-27
- 0.0.1 — 2015-04-16
- 0.0.0 — 2015-02-20

## README

human
=====

show seconds in a human-readable form

Usage
-----

This repository comes with a couple of implementations of the base algorithm in
different languages.  You can use any by simply dropping the logic into your
source code.

Node.JS
-------

You can install the javascript version of this with

    npm install human-time

and use it like

``` js
var human = require('human-time');

human(754);
// => "12 minutes ago"

human(new Date(Date.now() + 5 * 1000))
// => "5 seconds from now"

human(new Date(Date.now() - 5 * 1000))
// => "5 seconds ago"
```

Example (C)
-----------

compile

    make

run

    $ ./human 65
    1 minute
    $ ./human 600
    10 minutes

With the C example, you can optionally pass `-s` to get a suffix

    $ ./human 57483
    15 hours
    $ ./human -s 57483
    15 hours from now
    $ ./human -s -57483
    15 hours ago

License
-------

MIT

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