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

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

dcode

dcode

4 жыл бұрын

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 3 жыл бұрын
I've always had a little trouble with Date, but now I understand everything. Great tutorial!
@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.
@jamesnahtaniel6196
@jamesnahtaniel6196 Жыл бұрын
Best video I come across so far on this topic
@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
@jamesmassa1999
@jamesmassa1999 3 жыл бұрын
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 3 жыл бұрын
I appreciate that!
@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
@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 жыл бұрын
😁
@apocalypticbean
@apocalypticbean Жыл бұрын
Thanks for sharing
@simonmonce778
@simonmonce778 3 жыл бұрын
Thank you for this video!
@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!
@anurajms
@anurajms Жыл бұрын
thank you
@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
@zeekzaak350
@zeekzaak350 3 жыл бұрын
this was perfert. thanks my brotha
@dcode-software
@dcode-software 3 жыл бұрын
You are welcome
@JzfDavid
@JzfDavid 4 жыл бұрын
Awesome. Thanks 👍
@dcode-software
@dcode-software 4 жыл бұрын
Yeah no worries mate!!
@chloeb9325
@chloeb9325 2 жыл бұрын
Thank you!!
@dcode-software
@dcode-software 2 жыл бұрын
You're welcome
@suryapratap9915
@suryapratap9915 Жыл бұрын
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 ?
@mayanksharma7513
@mayanksharma7513 2 жыл бұрын
4:20 reading dates from databases
@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
@wiktorliszkiewicz354
@wiktorliszkiewicz354 3 жыл бұрын
You sound a little bit like Ozyman XD . Ps. Good nice tutorial ;>
@dcode-software
@dcode-software 3 жыл бұрын
I wonder why mate
@abaundwal
@abaundwal 4 жыл бұрын
Which theme?
@kujtimgjokaj659
@kujtimgjokaj659 2 жыл бұрын
How can I show today's real date without time there, it's annoying me
@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.
@emacipadung4104
@emacipadung4104 3 жыл бұрын
Iam indonesia
@atakhanovcoder139
@atakhanovcoder139 2 жыл бұрын
where are you from
@rsk-gold0012
@rsk-gold0012 4 жыл бұрын
Huf
@danisantos343
@danisantos343 2 жыл бұрын
Que escrotidão
@AstroSardaukar
@AstroSardaukar Жыл бұрын
You are wrong. It says (Eastern European Summer Time). Just kidding...
How to Format Dates with Vanilla JavaScript
10:51
Coding in Public
Рет қаралды 6 М.
Каха ограбил банк
01:00
К-Media
Рет қаралды 10 МЛН
🌊Насколько Глубокий Океан ? #shorts
00:42
ZKP系列课程|PLONK中的多项式
58:27
Antalpha Labs
Рет қаралды 36
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
Dates - Beau teaches JavaScript
8:05
freeCodeCamp.org
Рет қаралды 29 М.
React JS Full Course 2023 | Build an App and Master React in 1 Hour
1:11:44
JavaScript Mastery
Рет қаралды 1,5 МЛН
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,1 МЛН
JavaScript Date Object and Time Zones | Fixing an "off by 1 day" bug
16:32
Maker At Play Coding
Рет қаралды 23 М.
Date time formatting in Javascript
10:59
CodeVault
Рет қаралды 10 М.
Kubernetes Tutorial for Beginners [FULL COURSE in 4 Hours]
3:36:55
TechWorld with Nana
Рет қаралды 8 МЛН