Two Easy Ways to Compare Dates in JavaScript

dcode August 1, 2024
Video Thumbnail

About

High quality web development tutorials. On my channel you can find HTML, CSS & JavaScript tutorials, PHP tutorials, Node.js tutorials and Rust tutorials, as well as many other topics covered in web development. I also enjoy building JavaScript projects every now and then 🙂 Also - my name is Dom and I'm from Australia. 🏫 My Udemy Courses - https://www.udemy.com/user/domenic-corso/ 🎨 Download my VS Code theme - https://marketplace.visualstudio.com/items?itemName=dcode.dcode-theme 💜 Join my Discord Server - https://discord.gg/TXMQyvbpcA 🐦 Find me on Twitter - https://twitter.com/dcodeyt 💸 Support me on Patreon - https://www.patreon.com/dcode 📰 Follow me on DEV Community - https://dev.to/dcodeyt Enjoy!

You May Also Like

Upgrade Your Tech Today

AI-recommended products based on this video

Loading...
BASESAILOR iPhone 16 16e Car Charger Adapter 3Pack,USB to USBC Connector Type C Female to A Male Cable Converter for iPhone 15 14 Pro Max Plus,Apple Watch 10,Airpods 4,iPad mini 7,Samsung Galaxy S25

BASESAILOR iPhone 16 16e Car Charger Adapter 3Pack,USB to USBC Connector Type C Female to A Male Cable Converter for iPhone 15 14 Pro Max Plus,Apple Watch 10,Airpods 4,iPad mini 7,Samsung Galaxy S25

(7,876)
$11.99
FREE delivery Sat, Jun 14 on your first order
500+ bought in past month
Loading...
URVNS 240W USB C Car Charger, Super Fast Charging 4-Ports PD3.1 140W/PD3.0 100W PPS 45W QC65W Type-C Car Adapter for MacBook Pro Laptop iPhone 15 14 Max iPad Samsung Galaxy S24/23/22 Pixel etc

URVNS 240W USB C Car Charger, Super Fast Charging 4-Ports PD3.1 140W/PD3.0 100W PPS 45W QC65W Type-C Car Adapter for MacBook Pro Laptop iPhone 15 14 Max iPad Samsung Galaxy S24/23/22 Pixel etc

(114)
$57.36$49.99
Prime$5.48 delivery Mon, Jun 16
Loading...
UGREEN 130W Car Charger USB C Fast Charger PD3.0 QC4.0 PPS Fast Charging Car Adapter with 100W USB C Cable Compatible with Dell XPS, MacBook, iPhone 16 15 14 Pro Max, Galaxy S25 S24 Ultra, iPad Pro

UGREEN 130W Car Charger USB C Fast Charger PD3.0 QC4.0 PPS Fast Charging Car Adapter with 100W USB C Cable Compatible with Dell XPS, MacBook, iPhone 16 15 14 Pro Max, Galaxy S25 S24 Ultra, iPad Pro

(4,725)
$31.99
500+ bought in past month
Loading...
VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung

VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung

(54,882)
$32.25
FREE delivery Mon, Aug 25 on your first order
1K+ bought in past month
Loading...
Spigen Case for iPhone 17 Case, Ultra Hybrid MagFit [Anti-Yellowing, Magsafe Compatible] Designed for Apple iPhone 17 Case (2025) - Clear White ClimatePartner certified

Spigen Case for iPhone 17 Case, Ultra Hybrid MagFit [Anti-Yellowing, Magsafe Compatible] Designed for Apple iPhone 17 Case (2025) - Clear White ClimatePartner certified

(2,190)
$18.99
FREE delivery Sat, Sep 20 on your first order
Loading...
Spigen Case for iPhone 17 Case, Liquid Air Designed for Apple iPhone 17 Case (2025) - Matte Black ClimatePartner certified

Spigen Case for iPhone 17 Case, Liquid Air Designed for Apple iPhone 17 Case (2025) - Matte Black ClimatePartner certified

(3,371)
$13.99
FREE delivery Sat, Sep 20 on your first order
Loading...
Apple iPhone 16 Silicone Case with MagSafe - Fuchsia ​​​​​​​

Apple iPhone 16 Silicone Case with MagSafe - Fuchsia ​​​​​​​

(110)
$49.99
PrimeFREE delivery Sat, Jun 14
Loading...
Apple iPhone 16 Pro Silicone Case with MagSafe - Ultramarine ​​​​​​​

Apple iPhone 16 Pro Silicone Case with MagSafe - Ultramarine ​​​​​​​

(131)
$49.99
PrimeFREE delivery Sat, Jun 14
Loading...
2 Pack Magnetic Wireless Charger 15W Fast Mag-Safe Charger Stand Compatible with iPhone 16/15/14/13/12 Series Wireless Charging Pad for AirPods 3/2/Pro 2/Pro White Portable Mag Safe Kickstand

2 Pack Magnetic Wireless Charger 15W Fast Mag-Safe Charger Stand Compatible with iPhone 16/15/14/13/12 Series Wireless Charging Pad for AirPods 3/2/Pro 2/Pro White Portable Mag Safe Kickstand

(31)
$24.69
FREE delivery Sat, Jun 14 on your first order
500+ bought in past month
Loading...
Magnetic Wireless Charger for iPhone: Fodable 3 in 1 Charging Station for Multiple Apple Devices - Travel Charging Pad Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus & Airpod Global Recycled Standard

Magnetic Wireless Charger for iPhone: Fodable 3 in 1 Charging Station for Multiple Apple Devices - Travel Charging Pad Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus & Airpod Global Recycled Standard

(656)
$49.99
PrimeFREE delivery Sat, Jun 14
100+ bought in past month
Loading...
Wireless Earbuds, 2025 Bluetooth 5.4 Bass Stereo Headphones with 4 ENC Mic, 48H Playback Ear Buds with Charging Case LED Display,Sport Earphones IPX7 Waterproof for Phone, Android, Pad, White

Wireless Earbuds, 2025 Bluetooth 5.4 Bass Stereo Headphones with 4 ENC Mic, 48H Playback Ear Buds with Charging Case LED Display,Sport Earphones IPX7 Waterproof for Phone, Android, Pad, White

(38)
$27.99
Prime
Loading...
BASESAILOR iPhone 16 16e Car Charger Adapter 3Pack,USB to USBC Connector Type C Female to A Male Cable Converter for iPhone 15 14 Pro Max Plus,Apple Watch 10,Airpods 4,iPad mini 7,Samsung Galaxy S25

BASESAILOR iPhone 16 16e Car Charger Adapter 3Pack,USB to USBC Connector Type C Female to A Male Cable Converter for iPhone 15 14 Pro Max Plus,Apple Watch 10,Airpods 4,iPad mini 7,Samsung Galaxy S25

(7,876)
$11.99
FREE delivery Sat, Jun 14 on your first order
500+ bought in past month
Loading...
URVNS 240W USB C Car Charger, Super Fast Charging 4-Ports PD3.1 140W/PD3.0 100W PPS 45W QC65W Type-C Car Adapter for MacBook Pro Laptop iPhone 15 14 Max iPad Samsung Galaxy S24/23/22 Pixel etc

URVNS 240W USB C Car Charger, Super Fast Charging 4-Ports PD3.1 140W/PD3.0 100W PPS 45W QC65W Type-C Car Adapter for MacBook Pro Laptop iPhone 15 14 Max iPad Samsung Galaxy S24/23/22 Pixel etc

(114)
$57.36$49.99
Prime$5.48 delivery Mon, Jun 16
Loading...
UGREEN 130W Car Charger USB C Fast Charger PD3.0 QC4.0 PPS Fast Charging Car Adapter with 100W USB C Cable Compatible with Dell XPS, MacBook, iPhone 16 15 14 Pro Max, Galaxy S25 S24 Ultra, iPad Pro

UGREEN 130W Car Charger USB C Fast Charger PD3.0 QC4.0 PPS Fast Charging Car Adapter with 100W USB C Cable Compatible with Dell XPS, MacBook, iPhone 16 15 14 Pro Max, Galaxy S25 S24 Ultra, iPad Pro

(4,725)
$31.99
500+ bought in past month
Loading...
VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung

VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung

(54,882)
$32.25
FREE delivery Mon, Aug 25 on your first order
1K+ bought in past month
Loading...
Wireless Charging Case for AirPods Pro 1st / 2nd Gen with Type-C Charging Port, Compatible with AirPod Pro 2nd Generation Replacement Case, with Blue-Tooth Sync Button, No Earbuds

Wireless Charging Case for AirPods Pro 1st / 2nd Gen with Type-C Charging Port, Compatible with AirPod Pro 2nd Generation Replacement Case, with Blue-Tooth Sync Button, No Earbuds

(15)
$42.98
PrimeFREE delivery Sat, Jun 14
Loading...
Anker USB C Cable, [2-Pack, 6 ft] Type C Charger Premium Nylon USB Cable, USB A to Type C Charging Cable Fast Charge for Samsung Galaxy S10 S10+ / Note 8, LG V20 and Other USB C Charger (Black)

Anker USB C Cable, [2-Pack, 6 ft] Type C Charger Premium Nylon USB Cable, USB A to Type C Charging Cable Fast Charge for Samsung Galaxy S10 S10+ / Note 8, LG V20 and Other USB C Charger (Black)

(103,365)
$13.49
5K+ bought in past month
Loading...
Waterdrop 10UA Under Sink Water Filter System, Reduces Lead, Chlorine, Bad Taste & Odor, Under Counter Water Filter Direct Connect to Kitchen Faucet, NSF/ANSI 42 Certified, 8K Gallons, USA Tech

Waterdrop 10UA Under Sink Water Filter System, Reduces Lead, Chlorine, Bad Taste & Odor, Under Counter Water Filter Direct Connect to Kitchen Faucet, NSF/ANSI 42 Certified, 8K Gallons, USA Tech

(19,655)
$69.99
FREE delivery Tue, Sep 23
100+ bought in past month
Loading...
Waterdrop 17UA 3 Years Under Sink Water Filter System-Reduces Lead, Chlorine, Bad Taste & Odor-Under Counter Water Filter Direct Connect to Kitchen Faucet-NSF/ANSI 42 Certified-24000 Gallons-USA Tech

Waterdrop 17UA 3 Years Under Sink Water Filter System-Reduces Lead, Chlorine, Bad Taste & Odor-Under Counter Water Filter Direct Connect to Kitchen Faucet-NSF/ANSI 42 Certified-24000 Gallons-USA Tech

(2,977)
$99.99
FREE delivery Tue, Sep 23
100+ bought in past month
Loading...
BASESAILOR iPhone 16 16e Car Charger Adapter 3Pack,USB to USBC Connector Type C Female to A Male Cable Converter for iPhone 15 14 Pro Max Plus,Apple Watch 10,Airpods 4,iPad mini 7,Samsung Galaxy S25

BASESAILOR iPhone 16 16e Car Charger Adapter 3Pack,USB to USBC Connector Type C Female to A Male Cable Converter for iPhone 15 14 Pro Max Plus,Apple Watch 10,Airpods 4,iPad mini 7,Samsung Galaxy S25

(7,876)
$11.99
FREE delivery Sat, Jun 14 on your first order
500+ bought in past month
Loading...
URVNS 240W USB C Car Charger, Super Fast Charging 4-Ports PD3.1 140W/PD3.0 100W PPS 45W QC65W Type-C Car Adapter for MacBook Pro Laptop iPhone 15 14 Max iPad Samsung Galaxy S24/23/22 Pixel etc

URVNS 240W USB C Car Charger, Super Fast Charging 4-Ports PD3.1 140W/PD3.0 100W PPS 45W QC65W Type-C Car Adapter for MacBook Pro Laptop iPhone 15 14 Max iPad Samsung Galaxy S24/23/22 Pixel etc

(114)
$57.36$49.99
Prime$5.48 delivery Mon, Jun 16
Loading...
UGREEN 130W Car Charger USB C Fast Charger PD3.0 QC4.0 PPS Fast Charging Car Adapter with 100W USB C Cable Compatible with Dell XPS, MacBook, iPhone 16 15 14 Pro Max, Galaxy S25 S24 Ultra, iPad Pro

UGREEN 130W Car Charger USB C Fast Charger PD3.0 QC4.0 PPS Fast Charging Car Adapter with 100W USB C Cable Compatible with Dell XPS, MacBook, iPhone 16 15 14 Pro Max, Galaxy S25 S24 Ultra, iPad Pro

(4,725)
$31.99
500+ bought in past month
Loading...
VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung

VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung

(54,882)
$32.25
FREE delivery Mon, Aug 25 on your first order
1K+ bought in past month
Loading...
AINOPE Phone Holder for Car Vent 2025 Gravity Air Vent Car Phone Holder Mount for iPhone 16 Pro Max with Vent Clip Hand Free Cell Phone Car Mount for iPhone 16 Plus Samsung S25 Ultra Car Accesorries

AINOPE Phone Holder for Car Vent 2025 Gravity Air Vent Car Phone Holder Mount for iPhone 16 Pro Max with Vent Clip Hand Free Cell Phone Car Mount for iPhone 16 Plus Samsung S25 Ultra Car Accesorries

(29,179)
$19.99$18.17
FREE delivery Tue, Jun 17 on your first order
2K+ bought in past month
Loading...
VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung

VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung

(54,882)
$32.25
FREE delivery Mon, Aug 25 on your first order
1K+ bought in past month
Loading...
Spigen Case for iPhone 17 Case, Liquid Air Designed for Apple iPhone 17 Case (2025) - Matte Black ClimatePartner certified

Spigen Case for iPhone 17 Case, Liquid Air Designed for Apple iPhone 17 Case (2025) - Matte Black ClimatePartner certified

(3,371)
$13.99
FREE delivery Sat, Sep 20 on your first order
Loading...
Spigen Case for iPhone 16 Case, Tough Armor Designed for Apple iPhone 16 - Black

Spigen Case for iPhone 16 Case, Tough Armor Designed for Apple iPhone 16 - Black

(126)
$22.99
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
Spigen Case for iPhone 16 Case, Liquid Air Armor Designed for Apple iPhone 16 - Matte Black

Spigen Case for iPhone 16 Case, Liquid Air Armor Designed for Apple iPhone 16 - Matte Black

(2,445)
$15.99$15.17
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
Spigen Case for iPhone 16 Plus Case, Liquid Crystal Glitter Designed for Apple iPhone 16 Plus - Crystal Quartz

Spigen Case for iPhone 16 Plus Case, Liquid Crystal Glitter Designed for Apple iPhone 16 Plus - Crystal Quartz

(760)
$18.99
FREE delivery Sat, Jun 14 on your first order
Loading...
Magnetic Wireless Charger for iPhone - 3 in 1 Mag-Safe Charging Station for Multiple Devices Apple - Charger Stand Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus Airpods

Magnetic Wireless Charger for iPhone - 3 in 1 Mag-Safe Charging Station for Multiple Devices Apple - Charger Stand Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus Airpods

(750)
$59.99
PrimeFREE delivery Sat, Jun 14
Loading...
4-in-1 Wireless Magnetic Power Bank 10800mAh Portable Charger with iWatch Charger, QC4.0+20W PD Fast Charging USB C Battery Pack for Magsafe, iPhone 16/15/14/13/12 Series, Apple Watch etc. (White)

4-in-1 Wireless Magnetic Power Bank 10800mAh Portable Charger with iWatch Charger, QC4.0+20W PD Fast Charging USB C Battery Pack for Magsafe, iPhone 16/15/14/13/12 Series, Apple Watch etc. (White)

(581)
$42.95
PrimeFREE delivery Sat, Jun 14
Loading...
eazpower for Magsafe Power Bank 10000mAh, Magnetic Battery Pack Wireless, 20W PD Fast Charging, Compact Portable Charger with Built-in Cables and Stand for iPhone 16/15/14/13/12/ Apple Watch/Airpods

eazpower for Magsafe Power Bank 10000mAh, Magnetic Battery Pack Wireless, 20W PD Fast Charging, Compact Portable Charger with Built-in Cables and Stand for iPhone 16/15/14/13/12/ Apple Watch/Airpods

(330)
$39.99
PrimeFREE delivery Sat, Jun 14
200+ bought in past month