The Date Object - Getting, Setting & Formatting Dates in JavaScript - Tutorial For Beginners

  Рет қаралды 96,962

dcode

dcode

5 жыл бұрын

In this video I'll be demonstrating how to use the native JavaScript Date object to work with dates on the client-side of your web application or website.
In most cases, a library such as Moment.js may be more suitable for working with dates but sometimes this native object is enough to satisfy your requirements.
Support me on Patreon:
/ dcode - with enough funding I plan to develop a website of some sort with a new developer experience!
For your reference, check this out:
developer.mozilla.org/en/docs...
Follow me on Twitter @dcodeyt!
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

Пікірлер: 44
@invisibleboi5166
@invisibleboi5166 4 жыл бұрын
I've always had a little trouble with Date, but now I understand everything. Great tutorial!
@jamesmassa1999
@jamesmassa1999 4 жыл бұрын
Thanks again Dom! I'm constantly using your videos for reference; you're a one-man stack overflow! Please keep up the great work!
@dcode-software
@dcode-software 4 жыл бұрын
I appreciate that!
@JustSomeRandomIdiot
@JustSomeRandomIdiot 2 жыл бұрын
Perfect, thanks mate. Date object is always one of those things I've used but never sat down and studied the workings of because it was low on the priority list. Good to finally understand it a bit better.
@azorawarsingh8391
@azorawarsingh8391 3 жыл бұрын
thank you man, You literally gave me the answer for my assignment in my college, and also made me understand how the date system works in js
@ninjaduck3534
@ninjaduck3534 3 жыл бұрын
Covered exactly the right aspects of all this, thank you!
@jhonny95501
@jhonny95501 4 жыл бұрын
A lot of thanks! You said exactly what I thought: "Date object is more than enough"!
@dcode-software
@dcode-software 4 жыл бұрын
😁
@mrv3173
@mrv3173 3 жыл бұрын
Great Tutorial bro! Keep it up. Also to those who is looking for the mm/dd/yyyy 00:00 format you can skip to 15:50
@8koi139
@8koi139 2 жыл бұрын
pretty good introduction, wasn't able to find what I was looking for, but now I know whay I'm doing! tnx
@CodingAfterThirty
@CodingAfterThirty 4 жыл бұрын
Great video and straight to the point. Thank you.
@dcode-software
@dcode-software 4 жыл бұрын
No worries, mate
@0dyss3us51
@0dyss3us51 4 жыл бұрын
Would love to see you doing something cool with it visually as well, this was a great help!
@dcode-software
@dcode-software 4 жыл бұрын
Yeah I got a few mini projects coming up mate!
@0dyss3us51
@0dyss3us51 4 жыл бұрын
@@dcode-software sounds good, tganks for letting me know I will stay tuned!
@m12652
@m12652 4 жыл бұрын
Thanks matey, great tutorial... I’d be real interested to know the justification behind zero basing the month and not the day etc. Must have been a committee decision ;o)
@dcode-software
@dcode-software 4 жыл бұрын
No worries matey and yeah look it might just be since arrays start at 0
@simonmonce778
@simonmonce778 3 жыл бұрын
Thank you for this video!
@jamesnahtaniel6196
@jamesnahtaniel6196 Жыл бұрын
Best video I come across so far on this topic
@JzfDavid
@JzfDavid 5 жыл бұрын
Awesome. Thanks 👍
@dcode-software
@dcode-software 5 жыл бұрын
Yeah no worries mate!!
@zeekzaak350
@zeekzaak350 3 жыл бұрын
this was perfert. thanks my brotha
@dcode-software
@dcode-software 3 жыл бұрын
You are welcome
@suryapratap9915
@suryapratap9915 2 жыл бұрын
new Date("some-random-string-09") returns Sat Sep 01 2001 00:00:00 GMT+0530 instead of invalid date. but if I do "new Date("some-random-string") " it returns Invalid date. Is there a way to validate a string whether it is a valid date string or not ?
@chloeb9325
@chloeb9325 3 жыл бұрын
Thank you!!
@dcode-software
@dcode-software 3 жыл бұрын
You're welcome
@apocalypticbean
@apocalypticbean Жыл бұрын
Thanks for sharing
@abaundwal
@abaundwal 4 жыл бұрын
Which theme?
@saltech2024
@saltech2024 Жыл бұрын
This is cool But I'm looking for a one that will append a date after a post eg. Article 3.5 posted 18 hours ago or posted 3 years ago
@anurajms
@anurajms Жыл бұрын
thank you
@mayanksharma7513
@mayanksharma7513 2 жыл бұрын
4:20 reading dates from databases
@wiktorliszkiewicz354
@wiktorliszkiewicz354 3 жыл бұрын
You sound a little bit like Ozyman XD . Ps. Good nice tutorial ;>
@dcode-software
@dcode-software 3 жыл бұрын
I wonder why mate
@andrewporter5790
@andrewporter5790 3 жыл бұрын
I literally just want someone to show me how to get the date to update in real time WITHOUT the time stamp that is all. I can't find out how anywhere.
@atakhanovcoder139
@atakhanovcoder139 2 жыл бұрын
where are you from
@kujtimgjokaj659
@kujtimgjokaj659 2 жыл бұрын
How can I show today's real date without time there, it's annoying me
@emacipadung4104
@emacipadung4104 3 жыл бұрын
Iam indonesia
@rsk-gold0012
@rsk-gold0012 4 жыл бұрын
Huf
@danisantos343
@danisantos343 2 жыл бұрын
Que escrotidão
@AstroSardaukar
@AstroSardaukar 2 жыл бұрын
You are wrong. It says (Eastern European Summer Time). Just kidding...
#16 How to use the JS Date object | JavaScript Full Tutorial
15:36
HAPPY BIRTHDAY @mozabrick 🎉 #cat #funny
00:36
SOFIADELMONSTRO
Рет қаралды 15 МЛН
100❤️
00:19
MY💝No War🤝
Рет қаралды 22 МЛН
JavaScript Higher Order Functions & Arrays
34:56
Traversy Media
Рет қаралды 980 М.
DATE OBJECT CREATION || CREATING DATE OBJECT IN JAVA SCRIPT
31:00
Sundeep Saradhi Kanthety
Рет қаралды 7 М.
Sending Form Data (POST) with the Fetch API in JavaScript
8:21
AJAX Crash Course (Vanilla JavaScript)
1:09:43
Traversy Media
Рет қаралды 717 М.
HAPPY BIRTHDAY @mozabrick 🎉 #cat #funny
00:36
SOFIADELMONSTRO
Рет қаралды 15 МЛН