Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const dt = new Date();
- const padL = (nr, len = 2, chr = `0`) => `${nr}`.padStart(2, chr);
- console.log(`${padL(dt.getDate())}_${padL(dt.getMonth()+1)}_${dt.getFullYear()}_${padL(dt.getHours())}_${padL(dt.getMinutes())}_${padL(dt.getSeconds())}` );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement