UNPKG
obtaintime
Version:
latest (0.0.2)
0.0.2
A simple module to get date and time with format
github.com/urienix/obtaintime
urienix/obtaintime
obtaintime
/
obtainTime.js
7 lines
(5 loc)
•
187 B
JavaScript
View Raw
1
2
3
4
5
6
7
const
moment =
require
(
'moment-timezone'
);
exports
.
obtainTime
=
function
(
){
let
now =
Date
.
now
();
return
moment.
tz
(now,
'America/New_York'
).
format
(
'MMMM Do YYYY h:mm:ss a'
); }