const { dateToString } = require('@kimpa0107/date2str');
const date = new Date();
const res = dateToString(date, 'YYYY-MM-DD HH:mm:ss');
console.log(res);
year: YYYY
month: MM
day: DD
hour: HH
minute: mm
second: ss
Convert Date to string.
const { dateToString } = require('@kimpa0107/date2str');
const date = new Date();
const res = dateToString(date, 'YYYY-MM-DD HH:mm:ss');
console.log(res);
year: YYYY
month: MM
day: DD
hour: HH
minute: mm
second: ss
Convert Date to string.