npm

@fattureincloud/madbit-js-dates
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

MADBIT JS DATES

Version badge   License badge


Summary

MadBit JS Dates is a library used to manipulate and display dates. At the moment it uses date-fns under the hood.

Support english, italian and spanish languages.


How do I get set up?

# Npm
npm install madbit-js-dates

# Yarn
yarn add madbit-js-dates

How to use it

import format from 'madbit-js-dates/format'

format('2023-07-07', 'dd/MM/yyyy', 'it')

Shortcuts

Parsable shortcuts Corresponding value
'now' current date and time
'NOW' current date and time
'yesterday' yesterday date at this time
'YESTERDAY' yesterday date at this time
'tomorrow' tomorrow date at this time
'TOMORROW' tomorrow date at this time

Format shortcuts Corresponding format
'SQL' SQL date format (YYYY-MM-DD)
'SQL+T' SQL datetime format (YYYY-MM-DD HH:mm:ss)
'IT' Italian date format (DD/MM/YYYY)
'IT+T' Italian datetime format (DD/MM/YYYY HH:mm:ss)
'IT_FULL' Italian date with month name (Ex. 22 May 2000)
'IT_FULL+T' Italian date and time with month name (Ex. 22 May 2000 13:34:55)


Developed by

Michele Menegatti

Readme

Keywords

Package Sidebar

Install

npm i @fattureincloud/madbit-js-dates

Weekly Downloads

209

Version

0.2.0

License

MIT

Unpacked Size

260 kB

Total Files

48

Last publish

Collaborators

  • fabioangeloni
  • isaccobosio
  • andrealomonaco
  • erovaris
  • michi7
  • mattmilesi
  • sebastiansenderowski
  • stefanozaninific