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

dateformat-mm

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dateformat-mm

ateformat is a simple library that formats dates to something more understandable using the object Intl.RelativeTimeFormat

latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source
 

Dateformat

Github top language Github language count Repository size License Github issues Github stars

🚧 Dateformat 🚀 Under construction... 🚧


:dart: About

dateformat is a simple library that formats dates to something more understandable using the object Intl.RelativeTimeFormat. the module requires two parameters, the date and a language, by default the language is set to 'en', the language format supported is .ISO 639-1 code.

:checkered_flag: How to use

// import the module using
const { dateformat } = require('dateformat-mm');
// or
import { dateformat } from 'dateformat-mm';


// use
const dateFormat = dateformat('2020-11-12', 'en');
console.log(dateFormat)
>> 195 days ago
// returns from the current date, the days that have passed in the English language

// or you can also use
const dateFormatEs = dateformat('2021-05-26T01:00:36.876Z', 'es');
console.log(dateFormatEs)
>> hace 16 horas

:memo: License

This project is under license from MIT. For more details, see the LICENSE file.

Made with :heart: by ManuelMaciel

 

Back to top

Keywords

datetime

FAQs

Package last updated on 26 May 2021

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