time-format-like-instagram

1.0.1 • Public • Published

time-format-like-instagram

Time-Formate-Like-Instagram is very useful liberary for displaying date in form of duration.

Exapmple:

Out put will look like this.

last post 4 hour ago.
last post 1 day ago.
posted now.

MIT License

Installation

Install my-project with npm

  npm install --save time-format-like-instagram

Usage/Examples

import formatDate from 'my-project'


/** formatDate will return you string message
 * with duration between current date and provided date
*/

@return message
// pass date in string form like this
console.log(formateDate("2/14/2022")); // last post 19 Hours ago

Package Sidebar

Install

npm i time-format-like-instagram

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

5.84 kB

Total Files

5

Last publish

Collaborators

  • toseef-ahmad