// Date : Date is an object in javascript. // JavaScript stores dates as number of milliseconds since January 01, 1970 const myDate = new Date(); console.log(myDate) //Output : 2023-10-09T14:38:09.847Z // We can use various methods to convert this date into more readable value. console.log(myDate.toString()) //Output : Mon Oct 09 2023 07:39:18 GMT-0700 (Pacific Daylight Time) console.log(myDate.toLocaleString()) // Output : 10/9/2023, 7:44:20 AM console.log(myDate.toLocaleDateString()) //Output : 10/9/2023 console.log(myDate.toLocaleTimeString()) // Output : 7:45:31 AM console.log(myDate.toDateString()) //Output : Mon Oct 09 2023 console.log(myDate.toTimeString()) // Output : 07:46:40 GMT-0700 (Pacific Daylight Time) console.log(myDate.toISOString()) // Output : 2023-10-09T14:43:39.337Z console.log(myDate.toJSON()) //Output : 2023-10-09T14:40:58.495Z
I have tried learning javascript from multiple sources on CZcams, but the simplicity and organisation with which you teach is mind blowing. You cover the topics that other teachers don’t bother to cover. Thank you!
isi topic par video dhundh raha tha..much needed video for me..thank you bhai ji..you got new subscriber from heart.sab dosto ko bhi share kardi gai hain..keep it up brother😍
These tutorials have not only helped me learn a lot but have also ignited a passion for JavaScript. The explanations are clear, the examples are practical, and the learning experience has been truly enjoyable.
Sooooo nice bro your content and way of teaching is undescribable(very easy and understanding. 💓💓 May God bless you all happinesse and bless you success in every step of life. Ramember me also in your special prayers
I was watching other tutorial in other channel which were also good that makes me bore but this is not that boring till now and hope it does not get boring
outputs : Simple print : 2023-10-10T14:57:57.246Z Date to string : Tue Oct 10 2023 20:27:57 GMT+0530 (India Standard Time) Date to date-string : Tue Oct 10 2023 Date to local date string : 10/10/2023 Date to local time string : 8:27:57 pm
I have watched your Javascript series on your other channel and now watching this. Your content is truly amazing, and I love how you explain concepts from the very scratch.Thank You very much for your hard work.❤
I have watched until 12th Video and JAVASCRIPT never felt so easy before :D (Now i can relate with what you said in the first video: "Knowing JS is diff. but teaching JS is whole diff. thing")
2023-09-22T20:43:47.650Z Date printing in 'toString' method: Fri Sep 22 2023 20:43:47 GMT+0000 (Coordinated Universal Time) Date printing in 'toDateString' method: Fri Sep 22 2023 Date printing in 'toISOString' method: 2023-09-22T20:43:47.650Z Date printing in 'toJSON' method: 2023-09-22T20:43:47.650Z Date printing in 'toLocaleString' method: 9/22/2023, 8:43:47 PM Date printing in 'toUTCString' method: Fri, 22 Sep 2023 20:43:47 GMT
Hey guys, let's give a huge round of applause to Hitesh Choudhary💖 for his fantastic work on this channel. Make sure to hit subscribe to support him and get access to these awesome tutorials without spending a penny!
00:02 Organized content creation on CZcams is crucial. 02:04 JavaScript's proposal for a new temporal API as a global object 03:57 Converting date object to string and exploring various string methods in JavaScript 06:02 Understanding the Date object in JavaScript 08:12 Declaring and obtaining date and time values in different formats 10:19 Understanding and calculating millisecond values and date objects in JavaScript 12:19 Converting time units and using date methods in JavaScript. 14:17 Understanding date and time manipulation in JavaScript 16:22 Defining and customizing date and time properties in JavaScript. 18:08 Undeand time in JavaScript
Date object Thu Aug 24 2023 15:04:08 GMT+0000 (Coordinated Universal Time) Date object with toDateString(): Thu Aug 24 2023 Date object with toISOString(): 2023-08-24T15:04:08.236Z Date object with toLocaleDateString(): 8/24/2023 Date object with toLocaleString(): 8/24/2023, 3:04:08 PM Date object with toLocaleTimeString(): 3:04:08 PM Date object with toString(): Thu Aug 24 2023 15:04:08 GMT+0000 (Coordinated Universal Time) Date object with toTimeString(): 15:04:08 GMT+0000 (Coordinated Universal Time) Date object with toUTCString(): Thu, 24 Aug 2023 15:04:08 GMT
Cant we manipulate the format of dates ? For example let date = new Date(); console.log(date.toLocaleString()); //- Output - 4/16/2024, 7:28:22 AM here i want to print the date according to DD-MM-YYYY is it possible to do so ?
Hello guru ji kya aap khade hokar padha rhe hai . Hmko lag rha hai ki aap khade hokar padha rhe . Guru ji hm logo ke liye etna mehnat kr rhe hai . Guru ji Uske liye hm aapki 🙏🦵pair chhu pranaam karta hu ,🙏🙏🙏
Outputs of using different string methods:- console.log(myDate.toString()); - Sat Nov 25 2023 12:15:02 GMT+0000 (Coordinated Universal Time) console.log(myDate.toDateString()); - Sat Nov 25 2023 console.log(myDate.toISOString()); - 2023-11-25T12:15:02.092Z console.log(myDate.toLocaleDateString()); - 11/25/2023 console.log(myDate.toLocaleString()); - 11/25/2023, 12:15:02 PM
This course has no price label because this masterpiece is priceless ❤
Can't Believe I got a heart ❤️ so much love from Bihar❣️
@@NonToxic404 tu kam kr apna
@@shivanshbhatnagar2725 😂😂😂😂😂😂
@@shivanshbhatnagar2725 🤣🤣🤣
// Date : Date is an object in javascript.
// JavaScript stores dates as number of milliseconds since January 01, 1970
const myDate = new Date();
console.log(myDate) //Output : 2023-10-09T14:38:09.847Z
// We can use various methods to convert this date into more readable value.
console.log(myDate.toString()) //Output : Mon Oct 09 2023 07:39:18 GMT-0700 (Pacific Daylight Time)
console.log(myDate.toLocaleString()) // Output : 10/9/2023, 7:44:20 AM
console.log(myDate.toLocaleDateString()) //Output : 10/9/2023
console.log(myDate.toLocaleTimeString()) // Output : 7:45:31 AM
console.log(myDate.toDateString()) //Output : Mon Oct 09 2023
console.log(myDate.toTimeString()) // Output : 07:46:40 GMT-0700 (Pacific Daylight Time)
console.log(myDate.toISOString()) // Output : 2023-10-09T14:43:39.337Z
console.log(myDate.toJSON()) //Output : 2023-10-09T14:40:58.495Z
bhai,
toISOString and toISOString me output same kyu aata he?
@@ashok-bhaargaw bhai toISOString () or toISOString mein difference kya dikh rha zara batana?you might wrote the same function twice!
@@raginiroy9929 wahi toh ragini
@@raginiroy9929 He was trying to ask the difference between toISOString() and toJSON()
tumhara time pacific daylight time me kaise aa rha?
I have tried learning javascript from multiple sources on CZcams, but the simplicity and organisation with which you teach is mind blowing. You cover the topics that other teachers don’t bother to cover. Thank you!
Sir thumbnail me date ki jagah data likha hai 😎😎😎
You have put so much effort into your videos.....Thank you for providing these free contents.....Love You from Uttar Pradesh
Never found learning Javascript this interesting before this. Thank you Hitesh sir ❤
Thanks sir for such amazing and in depth video.Your content is full depth of knowledge wether hindi or english.
sir's voice is so smooth to hear , it feels i am listening to a story
Sir mene kafi javaScript ke course dekhe but aapka style boht crystal clear hai....we cant thank you enough sir to teach us that much in free❤
code with harry is best .....
best Series ALL OVER UNIVERSE, thank you Sir 🙏
This course is very help full in free of cost
Thank you sir for giving us a amazing J.S tutorial
@chai aur code ❤❤
Thankyou bhaiya for providing this amazing content
🥰😃
maja aa gaya sir
ek number sir love from (MP) Shahdol district
toString() : Sun May 07 2023 14:16:39
toDateString() : Sun May 07 2023
toTimeString() :14:19:03 GMT+0500 (Pakistan Standard Time)
toLocaleString() : 5/7/2023, 2:20:24 PM
toISOString() : 2023-05-07T09:21:22.167Z
toUTCString() : Sun, 07 May 2023 09:24:48 GMT
how are you getting time in your time zone?
@@honblegaurav9917 it appears by default for me. It uses internet connectivity to find your current timezone
i thing i want to say that i m in love with yr lecture after watching that😍😍😍😍😘😘...thanks a lot guru g
preety good course, covers everything in depth
very helpful video for beginners. thank you for making this type of valuable content for free...
"Chai aur Code, you've earned a special place in every JavaScript learner's heart. Outstanding work!"
isi topic par video dhundh raha tha..much needed video for me..thank you bhai ji..you got new subscriber from heart.sab dosto ko bhi share kardi gai hain..keep it up brother😍
These tutorials have not only helped me learn a lot but have also ignited a passion for JavaScript. The explanations are clear, the examples are practical, and the learning experience has been truly enjoyable.
Sooooo nice bro your content and way of teaching is undescribable(very easy and understanding. 💓💓 May God bless you all happinesse and bless you success in every step of life. Ramember me also in your special prayers
Understood everything, thank you sir
Anyone observer Video creation time is Morning 5 AM. What a dedication Love from Maharashtra ❣
😁😁
Ya it's really chai 😄 time with code 😄
I was watching other tutorial in other channel which were also good that makes me bore but this is not that boring till now and hope it does
not get boring
Its amazing JS Series🎉🎉
amazing content and explanation
outputs :
Simple print : 2023-10-10T14:57:57.246Z
Date to string : Tue Oct 10 2023 20:27:57 GMT+0530 (India Standard Time)
Date to date-string : Tue Oct 10 2023
Date to local date string : 10/10/2023
Date to local time string : 8:27:57 pm
Thank you so much Hitesh sir
Thank you sir making this playlist
Thank you so much sir 😍❤️🙇 main bohot happy hotahu apse sikhkr🥰
Learnt many things first time which not taught by others
I have watched your Javascript series on your other channel and now watching this. Your content is truly amazing, and I love how you explain concepts from the very scratch.Thank You very much for your hard work.❤
Thanks for this amazing tutorial !
beautiful video as always, thank you sir
I have watched until 12th Video and JAVASCRIPT never felt so easy before :D (Now i can relate with what you said in the first video: "Knowing JS is diff. but teaching JS is whole diff. thing")
Thank you so much sir...
But please upload videos daily
Great content ❤
Thanks for this amazing tutorial sir!
Great work !
Such a amazing course. Thankyou for teaching us ❤, Sir there is little mistake in thumbnail (DATA TIME -> DATE TIME)
very very well explained
2023-09-22T20:43:47.650Z
Date printing in 'toString' method: Fri Sep 22 2023 20:43:47 GMT+0000 (Coordinated Universal Time)
Date printing in 'toDateString' method: Fri Sep 22 2023
Date printing in 'toISOString' method: 2023-09-22T20:43:47.650Z
Date printing in 'toJSON' method: 2023-09-22T20:43:47.650Z
Date printing in 'toLocaleString' method: 9/22/2023, 8:43:47 PM
Date printing in 'toUTCString' method: Fri, 22 Sep 2023 20:43:47 GMT
i would appreciate a detailed explanation i m still confused about the concept ...new sub from USA
The Voice quality.🔥🔥🔥
Yes, That's very under-rated.
Thank you
Dhanyawad guruji 🙏
looking like a wow
Hey guys, let's give a huge round of applause to Hitesh Choudhary💖 for his fantastic work on this channel. Make sure to hit subscribe to support him and get access to these awesome tutorials without spending a penny!
This man is ❤❤❤
00:02 Organized content creation on CZcams is crucial.
02:04 JavaScript's proposal for a new temporal API as a global object
03:57 Converting date object to string and exploring various string methods in JavaScript
06:02 Understanding the Date object in JavaScript
08:12 Declaring and obtaining date and time values in different formats
10:19 Understanding and calculating millisecond values and date objects in JavaScript
12:19 Converting time units and using date methods in JavaScript.
14:17 Understanding date and time manipulation in JavaScript
16:22 Defining and customizing date and time properties in JavaScript.
18:08 Undeand time in JavaScript
Thank you so much, sir 🙏🙏
Thank You sir 😊😊
Nice video
Great
Thanks Sir
so good
thankyou sir
Javascript and me got something common Date is also my pain point sir ...................
hitesh sir op
nice
love you sir!
cool
thankss 🙌
thanks
awesome !
thank you❤❤❤
sir thumbnail me apne Data and time likha hai 😊 ajj notice Kiya Maine 😅, but no issues main motive is to learn something
Time stamp : 5:20
console.log("1 " + mydate.toString());
console.log("2 " +mydate.toISOString());
console.log("3 " +mydate.toJSON());
console.log("4 " +mydate.toDateString());
console.log("5 " +mydate.toTimeString());
console.log("6 " +mydate.toLocaleDateString());
console.log("7 " +mydate.toLocaleTimeString());
console.log("8 " +mydate.toLocaleString());
OUTPUT:-
1 Mon Oct 02 2023 20:33:54 GMT+0530 (India Standard Time)
2 2023-10-02T15:03:54.082Z
3 2023-10-02T15:03:54.082Z
4 Mon Oct 02 2023
5 20:33:54 GMT+0530 (India Standard Time)
6 10/2/2023
7 8:33:54 PM
8 10/2/2023, 8:33:54 PM
Date object Thu Aug 24 2023 15:04:08 GMT+0000 (Coordinated Universal Time)
Date object with toDateString(): Thu Aug 24 2023
Date object with toISOString(): 2023-08-24T15:04:08.236Z
Date object with toLocaleDateString(): 8/24/2023
Date object with toLocaleString(): 8/24/2023, 3:04:08 PM
Date object with toLocaleTimeString(): 3:04:08 PM
Date object with toString(): Thu Aug 24 2023 15:04:08 GMT+0000 (Coordinated Universal Time)
Date object with toTimeString(): 15:04:08 GMT+0000 (Coordinated Universal Time)
Date object with toUTCString(): Thu, 24 Aug 2023 15:04:08 GMT
😍😍
bhayya maza aaagya
Cant we manipulate the format of dates ?
For example
let date = new Date();
console.log(date.toLocaleString());
//- Output - 4/16/2024, 7:28:22 AM
here i want to print the date according to DD-MM-YYYY
is it possible to do so ?
sir aap ek bar full course ki video upload kr do watching apne aap aa jayegi
😍🥰🥰
done ✅
tum bht achy ho 😎
sirrr g ap cheezon ko itna simple way ma explain karty hai. i just love it..... tons of love from Pakistan
Simplicity hi to speciality h😁
@@chaiaurcode exactly
Chai aur Javascript | हिन्दी
Earlier myDate was Local_String now she is a Global_String
Hello Hitesh
At time 13:07 pe Date.now()/1000 = 1677672716.099 aur Math.floor() use krne k bad 1677672733 ? why so much difference ? Shouldn't it be 17 at last
1)myDate.toDateString()
2)myDate.toString()
3)myDate.toLocaleDateString()
4)myDate.toJSON()
5)myDate.toISOString()
results--->
Wed Apr 03 2024
Wed Apr 03 2024 20:40:49 GMT+0530 (India Standard Time)
4/3/2024
2024-04-03T15:10:49.321Z
2024-04-03T15:10:49.321Z
Sir aap pura (Node File -Name)
Bina Baar baar likhe kaise js file run kra rhe hai??
4:44
Watching this video just 1 year later same date ❤😅
Hello guru ji kya aap khade hokar padha rhe hai .
Hmko lag rha hai ki aap khade hokar padha rhe .
Guru ji hm logo ke liye etna mehnat kr rhe hai . Guru ji
Uske liye hm aapki 🙏🦵pair chhu pranaam karta hu ,🙏🙏🙏
console.log(Daate.toDateString());== Tue Sep 26 2023
console.log(Daate.toISOString()); ==2023-09-26T10:21:06.642Z
console.log(Daate.toJSON());2023-09-26T10:22:21.310Z
console.log(Daate.toLocaleDateString()); ==9/26/2023
console.log(Daate.toLocaleTimeString()); ==3:52:21 PM
console.log(Daate.toUTCString()); ==Tue, 26 Sep 2023 10:22:21 GMT
5:11
toString() - Fri Feb 23 2024 17:09:31 GMT+0530 (India Standard Time)
toDateString() - Fri Feb 23 2024
toJSON() - 2024-02-23T11:43:04.255Z
toLocaleDateString() - 23/02/2024
toLocaleString() - 23/02/2024, 5:09:31 PM
toLocaleTimeString() - 5:09:31 PM
toTimeString() - 17:09:31 GMT+0530 (India Standard Time)
toUTCString() - Fri, 23 Feb 2024 11:39:31 GMT
Vaise to mai chai nhi peeta video dekhte time but aaj pite huye dekh rha hu😁
💙💙💙
toString() - Mon Dec 04 2023 04:55:19 GMT+0000 (Coordinated Universal Time)
toUTCString() - Mon, 04 Dec 2023 04:56:58 GMT
toISOString() - 2023-12-04T05:03:18.152Z
toLocaleDateString() - 12/4/2023
toLocaleTimeString() - 4:56:29 AM
toDateString() - Mon Dec 04 2023
Sir what is the difference between to.JSON and to.ISOString.............
Hello sir Today I tried this without converting it into to string it show Fri Oct 20 2023 22:14:07 GMT+0530 (India Standard Time). How its works
Outputs of using different string methods:-
console.log(myDate.toString()); - Sat Nov 25 2023 12:15:02 GMT+0000 (Coordinated Universal Time)
console.log(myDate.toDateString()); - Sat Nov 25 2023
console.log(myDate.toISOString()); - 2023-11-25T12:15:02.092Z
console.log(myDate.toLocaleDateString()); - 11/25/2023
console.log(myDate.toLocaleString()); - 11/25/2023, 12:15:02 PM
Done with 13th video ✔☑✅
❤❤
2 date compare kar dikho sir muje aesa kahan hai thoda idea ho jaye ga sir
Playlist serial wise hai?
Methods With their Outputs
Date.toDateString() Thu Mar 14 2024
Date.toISOString() 2024-03-14T13:10:12.400Z
Date.toJSON() 2024-03-14T13:10:12.400Z
Date.toLocaleDateString() 3/14/2024
Date.toLocaleString() 3/14/2024, 6:04:12PM
Date.toLocaleTimeString() 6:04:12 PM
Date.toString() Thu Mar 14 2024 18:40:12 GMT+0530 (India Standard Time)
Date.toTimeString() 18:40:12 GMT+0530 (India Standard Time)
Date.toUTCString() Thu, 14 Mar 2024 13:10:12 GMT
12:34:01 GMT+0530 (India Standard Time)