Time is Relative, even in JavaScript

Time is Relative, even in JavaScript

Beyond Fireship

1 год назад

98,650 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Rich
Rich - 15.02.2023 04:25

Leave these js dates alone and use a library! Stop the madness

Ответить
Leonardo Raele
Leonardo Raele - 20.12.2022 11:03

Never create a Date object using a string input. It's deprecated API and is unreliable because it behaves differently in each browser.

Ответить
Yuri Soares
Yuri Soares - 26.10.2022 22:28

Fireship: Watch me ending this package whole career
Package: am I a joke to you

Ответить
Jorge Rivera
Jorge Rivera - 21.10.2022 04:44

Eso me viene como anillo al dedo, thank you...!

Ответить
Lakshya
Lakshya - 10.10.2022 06:29

Dopamine 🗿🔋

Ответить
Arnaldo Pérez
Arnaldo Pérez - 01.10.2022 02:02

I just send a technical test using this api, from a video I just spot yesterday..... You are a true hero bro, thanks for everything!!

Ответить
Ethan Bonin
Ethan Bonin - 28.09.2022 01:44

These videos are so crazy useful.

Ответить
Stephen Gillie
Stephen Gillie - 26.09.2022 17:12

Something I miss from Powershell is how much is built in. $diff = ((Get-Date) - (Get-Date 4/18/1960)) returns an array of key:value pairs, one of which is TotalDays, so you can just Write-Host "$($diff.TotalDays) days ago". Because it's a scripting (JIT) language on top of the .NET CLR, the only downside is that everything takes like 10x as long to execute as Node Javascript. But gosh is it easy to write. And most of it can copy-paste into a C# class (strip the variables of their dollar signs) to compile for faster execution.

Ответить
Icaro Mendes
Icaro Mendes - 26.09.2022 10:22

Any reason for starting a new channel?

Ответить
Guido De Rosa
Guido De Rosa - 24.09.2022 15:18

The problem is relative time per se :) From a UI perspective, what's supposed to be user-friendly in writing "78 weeks ago" instead of just a plain date remains a mystery to me.

Ответить
Jerry
Jerry - 23.09.2022 17:07

😕 ƤRO𝓂O𝕤ᗰ

Ответить
Venkatesh Hariharan
Venkatesh Hariharan - 22.09.2022 18:59

Didn't know this exists thanks

Ответить
James Foley
James Foley - 22.09.2022 00:02

Like a rat waiting for a pellet I smashed da thumbs up. Now give me my JS fireship pellet o wisdom

Ответить
Julio Rocha Filho
Julio Rocha Filho - 21.09.2022 01:37

Date-fns is a great option as well.

Ответить
NootNooter
NootNooter - 20.09.2022 09:50

"real"ative?

Ответить
Brad
Brad - 19.09.2022 21:30

I still find date-fns easier to read and use!

Ответить
Andy Martino
Andy Martino - 17.09.2022 14:35

how did make vscode show a hint like on the right side?

Ответить
Xavier Gonçalves
Xavier Gonçalves - 17.09.2022 01:24

I tried to use this to format dates according to timezone but could get the dates to match what moment already puts out

Ответить
Saulius The Black
Saulius The Black - 15.09.2022 17:43

useful tip :)

Ответить
Ben Miller
Ben Miller - 14.09.2022 07:10

What is the name of the VS Code extension that evaluates each line of code to see if it will run. I think Jeff is using it at the end of this video....???

Ответить
Ang Mathew
Ang Mathew - 13.09.2022 21:37

I wonder we will overflow you?You just remind me that website

Ответить
Mussa Charles
Mussa Charles - 13.09.2022 16:08

Hey thanks for the great video. I speak Swahili language anyway :)

Ответить
Sam Adrian P. Sabalo
Sam Adrian P. Sabalo - 13.09.2022 07:51

If only time stops when we code.

Ответить
Emmanuel Ng'wandu
Emmanuel Ng'wandu - 13.09.2022 07:48

Depamine given🔥. Kinda hopping you wont bring the for haters videos that wasn't cool.

Ответить
Carter Cole
Carter Cole - 12.09.2022 16:01

my hero

Ответить
Quinten C
Quinten C - 12.09.2022 10:36

I literally was dealing with this problem yesterday and instead looked up a barely working time since function on stackoverflow. THANKS!

Ответить
Susmito Bhattacharyya
Susmito Bhattacharyya - 12.09.2022 10:28

Cool man

Ответить
Geodesic Interpolation
Geodesic Interpolation - 11.09.2022 03:38

What if it's one day ago-- will it say "one days ago"?

Ответить
DP Fam
DP Fam - 11.09.2022 00:40

how do i create a sequence?

Ответить
Muang Muang
Muang Muang - 11.09.2022 00:22

Damn. Nice job. I realy couldn't find a proper tutorial explaining everytNice tutorialng you needed clearly but then i found tNice tutorials treasure of a video.

Ответить
Michael Rudiger
Michael Rudiger - 10.09.2022 19:57

Moment.js is good though

Ответить
Rida Tazi
Rida Tazi - 10.09.2022 18:10

What extension is that? Showing the console log thingy? 😢

Ответить
Yanechiko
Yanechiko - 10.09.2022 04:33

How to display results/errors in real time next to the line like you do, is there vscode extension or it's your Firemagic trick?

Ответить
Luis Marsiglia
Luis Marsiglia - 10.09.2022 02:20

Which extension gives the console.log result inline the code?

Ответить
Dev Mesh
Dev Mesh - 09.09.2022 22:26

Jeff knows Swahili🔥😅

Ответить
A Kam
A Kam - 09.09.2022 22:14

I feel like the Intl API will become a meme on this channel.

Ответить
Samir Nayakawadi
Samir Nayakawadi - 09.09.2022 21:54

Great 👍

Ответить
Jimmy
Jimmy - 09.09.2022 20:25

that was so helpful...didnt know about that Intl api

Ответить
Geckoo 86
Geckoo 86 - 09.09.2022 20:01

What do you use to show the console logs beside the line of code?

Ответить
LOFI BEATS
LOFI BEATS - 09.09.2022 20:00

I want to execute a code hasDateChanged(eg. previousDay != currentDay) only when the date has changed. But no matter what I do everytime the javascript code executes it gets reset and the if statement always return true. Can anyone help me with that?

Ответить
Walter Woshid
Walter Woshid - 09.09.2022 19:39

Pro Tip: Also add the "title" attribute in the html with your initial date

P.S. love your vids <3

Ответить
Yusay Safadi
Yusay Safadi - 09.09.2022 18:00

Today I'm literally trying to build this feature and out of nowhere this video comes up 😭

Ответить
SK Creation
SK Creation - 09.09.2022 17:02

When I added the GMS it softed completely different than yours. Yours softed more like a real app, wNice tutorialle mine softed very

Ответить
urangerel enkhtuvshin
urangerel enkhtuvshin - 09.09.2022 16:44

I would like to ask you a question please?

Ответить
HyperDarck
HyperDarck - 09.09.2022 10:03

Can someone please tell me how he gets the output directly instead of using the CLI? And what are the red/green squares on the left?

Ответить
Abner
Abner - 09.09.2022 04:44

I'm already addicted to this channel

Ответить
Maxim
Maxim - 09.09.2022 03:08

What VSCode plug-in are you using for inline REPL evaluation?

Ответить
Ricardo de Paula
Ricardo de Paula - 09.09.2022 01:53

Are these warnings that come from the side of the code an extension?

Ответить