@ricardojrmcom/date-format
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

🌙 @ricardojrmcom/date-format

Format dates

build license

author

lang version size




Install

npm install @ricardojrmcom/date-format

yarn add @ricardojrmcom/date-format

Usage

import { dateFormat, dateRelative } from '@ricardojrmcom/date-format'

dateFormat(new Date('2022-01-31'))
-> '12:00 AM - 31 Jan, 2022 GMT'

dateRelative(new Date('2022-01-31'))
->  {
      from: '2 months ago',
      fromNow: 'in 2 months',
      to: 'in 2 months',
      toNow: '2 months ago',
    }




License

MIT © Ricardo <l1b3r_-> Mota (@ricardojrmcom)

Bootstrapped with 🟪@ricardojrmcom/nova


Readme

Keywords

Package Sidebar

Install

npm i @ricardojrmcom/date-format

Weekly Downloads

1

Version

3.0.0

License

MIT

Unpacked Size

13.6 kB

Total Files

23

Last publish

Collaborators

  • ricardojrmcom