https://github.com/vutran/twas
🕰 Tiny (280B) relative time string function (eg: "3 seconds ago")
https://github.com/vutran/twas
ago from-now relative time timeago
Last synced: 7 months ago
JSON representation
🕰 Tiny (280B) relative time string function (eg: "3 seconds ago")
- Host: GitHub
- URL: https://github.com/vutran/twas
- Owner: vutran
- License: mit
- Created: 2018-01-24T21:06:48.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T19:33:53.000Z (about 3 years ago)
- Last Synced: 2025-09-08T07:52:06.359Z (7 months ago)
- Topics: ago, from-now, relative, time, timeago
- Language: JavaScript
- Homepage:
- Size: 500 KB
- Stars: 250
- Watchers: 2
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micro-npm-packages - twas - Generate a relative time string (Example: "3 seconds ago") (Modules / Date & Time)
- awesome-micro-npm-packages - twas - Generate a relative time string (Example: "3 seconds ago") (Modules / Date & Time)
- fucking-awesome-micro-npm-packages - twas - Generate a relative time string (Example: "3 seconds ago") (Modules / Date & Time)
- awesome-micro-npm-packages-zh - twas - 生成相对时间字符串 (例如: "3秒前") (模块 / 日期和时间)
README
# twas
[](https://coveralls.io/github/vutran/twas) [](LICENSE)
> Tiny (280B) relative time string function (eg: "3 seconds ago")
## Install
```bash
$ npm i -S twas
```
## Usage
```js
import twas from 'twas';
console.log(twas(Date.now() - (5 * 1000));
// -> 5 seconds ago
```
## License
MIT © [Vu Tran](https://github.com/vutran)