hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.4K
active users

TikTok does `new Date((new Date).getTime() - 864e5 * e).toLocaleDateString("en-US")` a lot

Like 300 times per day of active use in the last 14 days for every instrumented event.

e.g. in my profile with 7 days of active use it does it 2072 times for every hover, click etc.

@jrmuizel so there is actually a group of people who use Firefox and Tiktok.
Never would have guessed.

@jrmuizel this tries to get today's date at midnight, in a very glorified form?

@crystalmoon @jrmuizel As far as I understand, it tries to get the localized string for n days ago. In the issue tracker, the unminified version uses `dateNdaysAgo` as the variable name. It subtracts the function argument times 864e5, the number of milliseconds in a day, from the current datetime.

@jrmuizel Noob question: How is it related to Firefox ?
If i make a shitty website, will firefox make something to avoid my website crashing ?
(Maybe i don't understand something)

@jrmuizel As a dev, I’ve also noticed that toLocaleDateString is a much more expensive function than you might naively expect. Anybody knows of a good writeup about that?