Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

The `Intl` object in JS is so valuable, yet so underutilized Learn how to generate friendly relative time strings from a given date - like "in 10 minutes" or "last week" or "tomorrow" - with 0 dependencies in my latest blog post:

267,870 görüntüleme • 3 yıl önce •via X (Twitter)

10 Yorum

Steve (Builder.io) profil fotoğrafı
Steve (Builder.io)3 yıl önce

More of what you can do with `Intl.RelativeTimeFormat`, and some other super handy things you can do with `Intl`, in the full article:

Awa!s profil fotoğrafı
Awa!s3 yıl önce

Which software do you use for recording videos?

someone profil fotoğrafı
someone3 yıl önce

@theankurkedia check that out bro

n_oway profil fotoğrafı
n_oway3 yıl önce

nice one, the Spanish translation for the last one should be 'en 10 minutos' but seems to come back in English 🙃

Steve (Builder.io) profil fotoğrafı
Steve (Builder.io)3 yıl önce

doh, bad copy paste, will fix, thank you!

Koray 😷 profil fotoğrafı
Koray 😷3 yıl önce

works good with money too. new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' } ).format(money);

Noah Vandervelden profil fotoğrafı
Noah Vandervelden3 yıl önce

Didn’t know how useful this was until working with currency in a recent project! Completely changed how I did currency, time, and a lot of other things Intl had to offer

RodAvi profil fotoğrafı
RodAvi3 yıl önce

Awesome tip Steve, thanks a lot. !!!

const name = 'David'; profil fotoğrafı
const name = 'David';3 yıl önce

This is great. Thanks for this. I have a collection of utility functions I use that keep me from needing things like lodash. I'm currently using date-fns, but need to see if this might be near enough to remove that dependency as well.

AleqsBrujo profil fotoğrafı
AleqsBrujo3 yıl önce

I like your tips! Ty for the research and most important for sharing it<3

Benzer Videolar