1.1.0 • Published 3 years ago

time-age v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

🚀 Time age

A time formatting function to show how long it has been since inputted time

How to use

To install, run

yarn add time-age

or

npm install time-age

The function takes a single parameter of type number | string | Date

import timeAge from "time-age"

/* String type example */
timeAge(new Date()) // Just now
timeAge("2021-07-20T22:55:08.109+00:00") // 13 hours ago
/* Number type example */
timeAge(Date.now()) // Just now
timeAge(Date.now()-4000) // 4 seconds ago
const timeAge = require('time-age').default

/* String type example */
timeAge(new Date()) // Just now
timeAge("2021-07-20T22:55:08.109+00:00") // 13 hours ago
/* Number type example */
timeAge(Date.now()) // Just now
timeAge(Date.now()-4000) // 4 seconds ago
1.1.0

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago