@elyarenwer/etimer
v1.0.4
Published
This module be used to get current datetime,date and time
Downloads
4
Readme
ETimer Introduce
一个用于获取当前时间的小模块
This module be used to get current datetime,date and time
模块用于获取当前时间-日期-日期时间
Installation
npm i @elyarenwer/etimer
Uninstallation
npm uninstall @elyarenwer/etimer
Usage
const etimer = require('@elyarenwer/etimer');
let current_datetime = etimer.datetime();
let current_date = etimer.date();
let current_time = etimer.time();
console.log(current_datetime);// 2023-01-01 21:02:50
console.log(current_date);// 2023-01-01
console.log(current_time);// 21:02:50
API
datetime();
const etimer = require('@elyarenwer/etimer');
etimer.datetime()
get current datetime ,format with : YYYY-MM-DD HH:mm:ss
date();
const etimer = require('@elyarenwer/etimer');
etimer.date()
get current date ,format with : YYYY-MM-DD
time();
const etimer = require('@elyarenwer/etimer');
etimer.time()
get current datetime ,format with : HH:mm:ss
License
MIT © ElyarEnwer