Why Nostr? What is Njump?
2024-05-06 12:25:53

Andros Fenollosa on Nostr: Me encanta trabajar con day.js para manipular fechas, parsear, hacer búsquedas u ...

Me encanta trabajar con day.js para manipular fechas, parsear, hacer búsquedas u obtener tiempos relativos.
Por ejemplo, necesitaba obtener el día 1 del mes anterior: A la fecha actual (`dayjs()`), quito un mes (`subtract(1, 'month')`) y después voy al inicio del mes (`startOf('month')`).
Funcional y elegante.
Documentación: https://day.js.org/
#javascript #dayjs

Author Public Key
npub12yygmfe8rx5jhr0e0hplgkxu82uru5w3yfptsddamecs7zxhddvsx0rwl8