New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

user-friendly-date

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

user-friendly-date

Shows the amount of time between two dates in a user-friendly way.

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

user-friendly-date

Shows the amount of time between two dates in a user-friendly way.

Usage

Install the package...

$ npm i user-friendly-date --save

...then...

const userFriendlyDate = require('user-friendly-date'); // or import userFriendlyDate from 'user-friendly-date

userFriendlyDate(new Date().getTime())
// -> Just now

userFriendlyDate(new Date().getTime() - 5000) // five seconds ago
// -> Five seconds ago

userFriendlyDate(new Date().getTime() - 1000 * 60 * 60 * 24) // the day before yesterday
// -> About 2 days ago

Hope this package helps you!

Found a bug? Open an issue, or ping me on Discord: Vehmloewff#0714.

Keywords

user-friendly

FAQs

Package last updated on 26 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts