Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

date-utils-2020

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

date-utils-2020

date utils 2020, format(date: Date, formatter: string)/toDate(a?: any)...

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
68
increased by161.54%
Maintainers
1
Weekly downloads
 
Created
Source

date-utils-2020

date utils 2020, format(date: Date, formatter: string)/toDate(a?: any)...

Downloads Version License

npm i -S date-utils-2020
# or
yarn add date-utils-2020

Usage

import { formatDate, toDate } from 'date-utils-2020'

const date = toDate('2020-12-04')
console.log(date) 
// Fri Dec 04 2020 09:00:00 GMT+0900 (Japan Standard Time)

const result = formatDate('2020-12-04', 'yyyy/MM/dd W')
console.log(result)
// 2020/12/04 五

Methods

MethodParametersDescription
formatDate(date: any, fmt: string, languagePack?: object)return string
toDate(s: any)return Date or null
isNumberLike(n: any)return Boolean true or false
isString(n: any)return Boolean true or false
toTwoDigits(n: number)return string

Keywords

FAQs

Package last updated on 04 Dec 2020

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc