Skip to content

zhangmingfeng/date-simple-format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

date-simple-format

javascript time&date simple format

install

npm install date-simple-format --save

example

  • test.js
const format = require("date-simple-format");

const time1 = format();
console.log(`time1:${time1}`);

const time2 = format("Sun Feb 25 2018 10:57:39 GMT+0800 (CST)", "yyyy-MM-dd");
console.log(`time2:${time2}`);

const time3 = format(1519527578, "yyyy-MM-dd hh:mm:ss");
console.log(`time3:${time3}`);

$ node test.js
time1:10:55:08
time2:2018-02-25
time3:2018-02-25 10:59:38

About

nodejs time&date simple format

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published