Time is Relative, even in JavaScript

preview_player
Показать описание
Format dates in JavaScript like "x days ago" or "in x minutes" using a relative time formatter.

#javascript #tutorial
Рекомендации по теме
Комментарии
Автор

Cryptography, date-time management, and internationalization. Three things that software developers should always use battle-tested libraries for instead of rolling out their own implementation.

jamestiotio
Автор

Bring me some more of these JS native APIs tips! When I first started out with web dev i remember this was one of the hardest part for me, it took a embarrassingly long time to learn about .toDateString

ThePouetman
Автор

The main advantage of using a library like momentjs over this is that those libraries can usually automatically format it into the relevant time interval without you needing to specify it yourself.

jackdavenport
Автор

Your last tip may work for calculating days, but it breaks down if calculating years due to leap years. Also doesn't account for leap seconds, if that matters for your program.

LimitedWard
Автор

Intl has saved me so many times now, im surprised so many people dont already use it

whamer
Автор

It's like the new Fireship brings us content the first Fireship used to do.
Love the comeback! 🤓

ste-fa-no
Автор

Woah, didn't know this channel existed till it appeared in my recommendations

heMech
Автор

The simple math part is a bad idea. With time, there are always exceptions (ie the time that one country skipped a day).

WACdeG
Автор

This is the actual #shorts that I want the see!

murat.terzioglu
Автор

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

quintencabo
Автор

I'm already addicted to this channel

tropicalverktaki
Автор

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

arnaldoperez
Автор

This is helpful.
I really need this because I'm making a blog post

ken
Автор

use multi-date lib its light weight and super useful for formatting dates, add dates and even compare it

bdbose
Автор

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

wandenreich
Автор

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

P.S. love your vids <3

WalterWoshid
Автор

it's about time you made this video

vencler
Автор

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.

vanbyakmuang
Автор

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

snithfferx
Автор

The first Beyond Fireship vid I've ever watched

nanonkay
visit shbcf.ru