# number-timeago

> numeric time ago like rails ( 2..days.ago() )

Latest version **0.1.2** (published 2016-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install number-timeago
pnpm add number-timeago
yarn add number-timeago
bun add number-timeago
```

## 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.1.2 |
| Published | 2016-05-27 |
| First published | 2016-05-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jason Hou |
| Maintainers | falm |
| Keywords | time, ago, numerice, rails |

## Links

- npm: https://www.npmjs.com/package/number-timeago
- Repository: https://github.com/falm/number-timeago
- Homepage: https://github.com/falm/number-timeago#readme
- Issues: https://github.com/falm/number-timeago/issues
- npm.io page: https://npm.io/package/number-timeago

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2016-05-27
- 0.1.1 — 2016-05-27
- 0.1.0 — 2016-05-27

## README

# number-timeago [![Build Status](https://travis-ci.org/falm/number-timeago.svg?branch=master)](https://travis-ci.org/falm/number-timeago)
> A number timeago package support 2..years.ago() method

## Install
```bash
$ npm install number-timeago
```
It's also available on NPMCDN https://npmcdn.com/number-timeago@0.1.1/number.timeago.js

## Usage
**Node.js CommonJS**
```js
require("number-timeago")();
```
**AMD**
```js
require(['number-timeago'], function (NumberTimeAgo) {
  NumberTimeAgo();
});  
```
then

```js
// seconds
20..seconds // => 20,000 milliseconds
// minutes
10..minutes // => 600,000 milliseconds
// weeks, days, months, years so on

// time ago
2..months.ago() // will return 2 months ago Date object
// => Mon Mar 28 2016 11:46:07 GMT+0800 (CST)
```

## License

MIT © [Falm](https://github.com/falm)

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