Learn Temporal API In 17 Minutes

preview_player
Показать описание

Date in JavaScript suck to work with. They are clunky, have a terrible API, and overall make writing code less fun. Luckily, the Temporal API is being added to JavaScript which solves all the problems I have with dates and then some.

📚 Materials/References:

🌎 Find Me Here:

⏱️ Timestamps:

00:00 - Introduction
00:50 - Polyfill Setup
02:18 - Basic Date Types
06:25 - Advanced Date Types
07:14 - Helper Methods
14:30 - Duration Type

#TemporalAPI #WDS #JavaScript
Рекомендации по теме
Комментарии
Автор

What a nice way to work with dates, hope it gets to stage 4

Andressuquaz
Автор

3:10 "21th" minute is definitely a highlight for me

json_bourne
Автор

"Dates in javascript SUCK!" - Never have truer words been spoken.

haukurorsson
Автор

This is definitely exciting. But I think you’re a bit optimistic to say we might get it soon 😁. That jump from stage 3 to stage 4 is significant. Now everybody has to agree on implementation details…this is the hard work.

genehenson
Автор

I voted up Temporal API in the tc39 request. Now, I feel prouder than ever before

krtirtho
Автор

Brilliant! 👏🏻 Right on time!
I already have a project where I will make use of this (polyfill) ! Thank you 🙏🏻

CirTap
Автор

This has been more magical than Excel's date/time/duration functions. I'm in awe. Thank you!

note
Автор

In case anyone of you is wondering (I did) : the "P" in ISO-Durations comes from "period"

MikeLukuma
Автор

I was always fighting with the date-time type. This explanation of Temporal Date shows it can be much easier to work with dates. This is about the difference between C and C++ in difficulty level.

hoekbrwr
Автор

I was recently working on a project where I needed to convert between an event timezone and the users timezone, and it was a complete pain, and relied on converting to a strong and back to a date, which works differently in Firefox and Chrome, not to mention in different locales. This will make that so much easier.

lostcarpark
Автор

Thank you very much for this video, dates has created so much frustration. So far I haven’t really been completely satisfied with date-fns or luxon. This looks really promising, thank you for sharing 💪

magnuskjelland
Автор

Pure gold!
I hate the old Date system.

threeone
Автор

5:40
> month: 1
Am is seeing this right? Month isn't 0-indexed anymore? What a time to be alive! :D

rianfuro
Автор

easily the best dating advice I've seen

ieronim
Автор

This is seriously cool! Definitely looking forward to seeing it reach stage 4!

jamienordmeyer
Автор

This is mind-blowing. Seems like once we start using this, we no longer need date-fns

tsuyoshi
Автор

Very useful, thanks for clear explanation! I cant wait for temporal to hit browsers.

philmayfield
Автор

I wonder what would happen when you compare with .equals() method two the same dates from different timezones, so the times would be different but pointing to the same "moment".

koigxiritbttgyuv
Автор

I just recently had to fight with localization in JS. It will be nice to see this in JS. PHP has been a dream compared to what JS has put me through.

sam
Автор

5:27 This is so amazing when we put 2022-01-01 into function and as a returned value got 2022-01-01

kirillzlobin