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:

8.9K
active users

not one part of this works as expected

```javascript
date.getDay() + "/" + date.getMonth() + "/" + date.getYear()
```

@joelanman For what you're trying to do, there are better approaches, FWIW. The `Intl.DateTimeFormat` API would probably handle that much more smoothly (dates a fucking disaster in JS).

```
// Get a short localized date
// returns "8/15/24"
let shortDateStr = new Intl.DateTimeFormat('en-US', {
dateStyle: 'short'
}).format(new Date());
```

Joe Lanman

@cferdinandi yeh thanks I know it! Just amazing how bad the normal date api is

@joelanman been holding my breath on the Temporal API for ages