Dates in Javascript | Javascript dates using nodejs | dates

Publicado el: 11 octubre 2022
en el canal de: Rank1 Education
110
8

complete Javascript Playlist
   • Complete JavaScript  Basics  

command
npm install moment --save

const moment = require("moment");
const d = moment().format("MMMM Do YYYY, h:mm:ss a");
console.log(d);
const t = moment().format("dddd");
console.log(t);
const m = moment().format("MMM Do YY");
console.log(m);
const p = moment().format();
console.log(p);

additional code format
moment().format('MMMM Do YYYY, h:mm:ss a'); // October 12th 2022, 1:33:16 am
moment().format('dddd'); // Wednesday
moment().format("MMM Do YY"); // Oct 12th 22
moment().format('YYYY [escaped] YYYY'); // 2022 escaped 2022
moment().format();
----------------------------------------------------------------
moment("20111031", "YYYYMMDD").fromNow(); // 11 years ago
moment("20120620", "YYYYMMDD").fromNow(); // 10 years ago
moment().startOf('day').fromNow(); // 2 hours ago
moment().endOf('day').fromNow(); // in a day
moment().startOf('hour').fromNow(); //33 minutes ago
----------------------------------------------------------------------
calendar Time
moment().subtract(10, 'days').calendar(); // 10/02/2022
moment().subtract(6, 'days').calendar(); // Last Thursday at 1:32 AM
moment().subtract(3, 'days').calendar(); // Last Sunday at 1:32 AM
moment().subtract(1, 'days').calendar(); // Yesterday at 1:32 AM
moment().calendar(); // Today at 1:32 AM
moment().add(1, 'days').calendar(); // Tomorrow at 1:32 AM
moment().add(3, 'days').calendar(); // Saturday at 1:32 AM
moment().add(10, 'days').calendar();
--------------------------------------------------------------------------
moment.locale(); // en
moment().format('LT'); // 1:31 AM
moment().format('LTS'); // 1:31:27 AM
moment().format('L'); // 10/12/2022
moment().format('l'); // 10/12/2022
moment().format('LL'); // October 12, 2022
moment().format('ll'); // Oct 12, 2022
moment().format('LLL'); // October 12, 2022 1:31 AM
moment().format('lll'); // Oct 12, 2022 1:31 AM
moment().format('LLLL'); // Wednesday, October 12, 2022 1:31 AM
moment().format('llll'); // Wed, Oct 12, 2022 1:31 AM
*/





In this video, I’ll show you how to access Dates using node js

🪄Enjoy!

🔥Motivation for Learning🔥
➡️"An investment in knowledge pays the best Interest."

Hi! I’m Ajinkya Sir.
🌎Mentored 5000+ Students Online and Offline
B-Tech In Electronics.
Passionate Teacher by Profession.
Be smart and Think logically

❓If you have any doubt or you want us to cover a certain topic,
please comment below.


✅If you need a video on particular topic just write in comment section.

We stream our sessions Live and Recorded sessions on this channel
Video are scheduled on timeline as Upcoming Live Stream.
videos are posted on daily basis.


ASK YOUR DOUBTS IN THE 💬COMMENT SECTION

Connect with me personally on
🔗📌Telegram : https://t.me/Rank1edu
🔗📌YouTube:    / rank1education  
🔗📌Instagram Official: @Rank1_Knowledge
🔗📌Instagram Personal: @ajinkya0011
🔗📌instagram:  / ajinkya0011  
🔗📌website: https://rank1.org.in


🙏🏻Do Like, Share and Subscribe our channel for Quality Learning Videos.
Regards,
Ajinkya Sir
-------------------------------------------------------------------------------------------------
Please 💓Like , Comment, Share and Subscribe💯


Don't forget to hit the🔔bell icon for further updates.

😊Thanks for 📺watching my video
Regards,
Er Ajinkya Sir


En esta página del sitio puede ver el video en línea Dates in Javascript | Javascript dates using nodejs | dates de Duración hora minuto segunda en buena calidad , que subió el usuario Rank1 Education 11 octubre 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 110 veces y le gustó 8 a los espectadores. Disfruta viendo!