New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

china-time

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

china-time

Nodejs 获取北京时间

0.12.2
Source
npm
Version published
Weekly downloads
365
3.99%
Maintainers
1
Weekly downloads
 
Created
Source

china time

Nodejs 获取北京时间

download version license

install

yarn add china-time

if you prefer npm:

npm i china-time

usage

const chinaTime = require('china-time');

console.log(chinaTime()); // 2018-02-07T04:38:00.000Z
console.log(chinaTime().getTime()); // 1517978280000
console.log(chinaTime('YYYY-MM-DD HH:mm:ss')); // 2018-02-07 13:08:17
console.log(chinaTime('YY/MM/DD HH:mm')); // 18/02/07 13:08
console.log(chinaTime('YYYY MM DD')); // 2018 02 07

License

MIT License

Copyright (c) 2017-present, hwen hwenleung@gmail.com

Keywords

Beijing time

FAQs

Package last updated on 07 Feb 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