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

yzf-date-format

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yzf-date-format

日期格式化

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

完整压缩版-欢迎使用(5.09 kB)

** 版权属于yzflhez@126.com

DFormat(value, format)日期Filter

// const aa = DFormat('2018-08-12', 'YYYY-MM-DD hh:mm:ss');
第三个参数默认是' '
// const aa = DFormat('2018-08-12', 'YYYY-MM-DD~hh:mm:ss', '~'); 2018-08-12 ~ 08:02:36
// const aa = DFormat('2018-08-12', ['YYYY-MM-DD', 'hh:mm:ss'], '~'); 2018-08-12 ~ 08:02:36
// DFormat('2018-08-12 12:35:24', 'YYYY~MM') => 2018~08
// DFormat('2018-08-12 12:35:24', 'MM-D') => 08-12
// DFormat('2018-08-12 12:35:24', 'YYYY~MM hh:mm') => 2018~08 12:35
// DFormat('2018-08-12 12:35:24', 'YYYY~MM/DD mm/ss', '<=>') => 2018~08/12<=>35/24

AddDate(value, length) 日期加length天

// const cc = AddDate(null, 61);

AddMonth(value, length) 日期加length月

// const dd = AddMonth(null, 2);

模块引入

~ tnpm install yzf-date-format --save
~ import { NFormat } from 'yzf-date-format';

Keywords

日期格式化

FAQs

Package last updated on 27 Jul 2019

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