Socket
Book a DemoInstallSign in
Socket

datefmt

Package Overview
Dependencies
Maintainers
8
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datefmt

Date format lib

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
21
-32.26%
Maintainers
8
Weekly downloads
 
Created
Source

#datefmt

Date format lib

Usage

Uses php style date format.

const date = new Date(2013, 4, 8);
datefmt('%j %D %l', date); // 8 Wed Wednesday
const date = new Date(2013, 0, 6);
const months = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'];
const days = ['Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado', 'Domingo'];

datefmt.translate(months, days);
datefmt('%F', date); //Enero
datefmt('%l', date); //Lunes

FAQs

Package last updated on 06 Nov 2018

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.