@nkp/age
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

@nkp/age

npm version deploy status known vulnerabilities

Get an approximate human readable number of years, months,days, hours, minutes, seconds between dates.

import { getAge } '@nkp/age';

// 1y1m2d
console.log(getAge(new Date(2021, 2, 3)));

Table of contents

Exports

@nkp/age exports both CommonJS and ES modules.

Installation

npm

npm install @nkp/age

yarn

yarn add @nkp/age

pnpm

pnpm add @nkp/age

Publishing

To a release a new version:

  1. Update the version number in package.json
  2. Push the new version to the master branch on GitHub
  3. Create a new release on GitHub for the latest version

This will trigger a GitHub action that tests and publishes the npm package.

Readme

Keywords

Package Sidebar

Install

npm i @nkp/age

Weekly Downloads

10

Version

1.0.5

License

MIT

Unpacked Size

11.1 kB

Total Files

6

Last publish

Collaborators

  • nickkelly